]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: clean up error checking and return of _lookup_parent 28612/head
authorJeff Layton <jlayton@redhat.com>
Thu, 30 May 2019 19:56:53 +0000 (15:56 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Mon, 17 Jun 2019 20:11:31 +0000 (13:11 -0700)
commit86494c36596d04069b6f250afa13fcf1a562c389
tree5d72b0f587020f3f036411b7a32dc229adcdab87
parentdf71f8c5b8fef963bb2f8de4e72402717a8010cc
client: clean up error checking and return of _lookup_parent

ll_lookup_inode can end up getting back 0 from _lookup_parent,
without zeroing out the parent pointer, which ends up remaining
uninitialized.

Fix this by moving most of the sanity checks in _lookup_parent
into ll_lookup_inode, and only have it issue the call to the MDS.

This also allows us to do the checks in a more sane order.

Fixes: http://tracker.ceph.com/issues/40085
Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit 3ade7c046c6c5eaf20517d0713a805a681128831)
src/client/Client.cc