]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: clean up error checking and return of _lookup_parent 28437/head
authorJeff Layton <jlayton@redhat.com>
Thu, 30 May 2019 19:56:53 +0000 (15:56 -0400)
committerJeff Layton <jlayton@redhat.com>
Thu, 6 Jun 2019 19:52:22 +0000 (15:52 -0400)
commit150173e065d0942a3f6c65a5536a60eae1b3e874
tree181c59768025e0df918f068080a3a6f4342d0ca7
parent74f0c36082d85e2e4640914549dc003742d265b2
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 : std::lock_guard() => Mutex::Locker()
       ceph_assert() => assert()
       dentries.empty() => dn_set.empty()
src/client/Client.cc