ceph: vet the target and parent inodes before updating dentry lease
authorJeff Layton <jlayton@redhat.com>
Fri, 27 Jan 2017 14:13:57 +0000 (09:13 -0500)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 20 Feb 2017 11:16:09 +0000 (12:16 +0100)
commitf5d55f03973f79a008bf8635452849f8ef589c23
tree2e8036d1944ed97451ad009451cae2d3bc0724b3
parent80d025ffede88969f6adf7266fbdedfd5641148a
ceph: vet the target and parent inodes before updating dentry lease

In a later patch, we're going to need to allow ceph_fill_trace to
update the dentry's lease when the parent is not locked. This is
potentially racy though -- by the time we get around to processing the
trace, the parent may have already changed.

Change update_dentry_lease to take a ceph_vino pointer and use that to
ensure that the dentry's parent still matches it before updating the
lease.

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/inode.c