]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: clean up error checking and return of _lookup_parent 29609/head
authorJeff Layton <jlayton@redhat.com>
Thu, 30 May 2019 19:56:53 +0000 (15:56 -0400)
committerJeff Layton <jlayton@redhat.com>
Mon, 12 Aug 2019 12:49:15 +0000 (08:49 -0400)
commit9fda0631680c928322701cccff59100104eff8de
tree7e82ccfceadd9089d489be72227efd768963902d
parent4cdf01f185630e5eafe7700d57f40c812fd1a880
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)

Conflicts:
src/client/Client.cc
    - Mutex::Locker -> std::lock_guard
    - changed some asserts to ceph_asserts
src/client/Client.cc