ceph: fix RCU case handling in ceph_d_revalidate()
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 29 Oct 2019 13:50:19 +0000 (13:50 +0000)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 29 Oct 2019 21:29:54 +0000 (22:29 +0100)
commitaa8dd816732b2bab28c54bc4d2ccf3fc8a6e0892
tree0805d90f6214b72791f9ca0cd12cc85b1dd6d3fa
parentea60ed6fcf29eebc78f2ce91491e6309ee005a01
ceph: fix RCU case handling in ceph_d_revalidate()

For RCU case ->d_revalidate() is called with rcu_read_lock() and
without pinning the dentry passed to it.  Which means that it
can't rely upon ->d_inode remaining stable; that's the reason
for d_inode_rcu(), actually.

Make sure we don't reload ->d_inode there.

Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/dir.c