ceph: do a LOOKUP in d_revalidate instead of GETATTR
authorJeff Layton <jlayton@redhat.com>
Mon, 30 Jan 2017 14:47:25 +0000 (09:47 -0500)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 20 Feb 2017 11:16:10 +0000 (12:16 +0100)
commit5eb9f6040f3854c5b92c60fd211dc0235ef25ca8
tree80fb85ed7910492940abd30e13174a5fd4c05a7b
parentcdde7c43513de7d8baec3ad7f6a01a177e00e968
ceph: do a LOOKUP in d_revalidate instead of GETATTR

In commit c3f4688a08f (ceph: don't set req->r_locked_dir in
ceph_d_revalidate), we changed the code to do a GETATTR instead of a
LOOKUP as the parent info isn't strictly necessary to revalidate the
dentry. What we missed there though is that in order to update the lease
on the dentry after revalidating it, we _do_ need parent info.

Change ceph_d_revalidate back to doing a LOOKUP instead of a GETATTR so
that we can get the parent info in order to update the lease from
ceph_fill_trace. Note that we set req->r_parent here, but we cannot set
the CEPH_MDS_R_PARENT_LOCKED flag as we can't guarantee that it is.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Yan, Zheng <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/dir.c