summaryrefslogtreecommitdiff
path: root/fs/ceph
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2019-10-29 16:53:29 +0300
committerIlya Dryomov <idryomov@gmail.com>2019-10-30 00:29:55 +0300
commit1f08529c84cfecaf1261ed9b7e17fab18541c58f (patch)
tree0a41af995c4c3d7259ea69de0413b2e8cfc4a7f8 /fs/ceph
parentaa8dd816732b2bab28c54bc4d2ccf3fc8a6e0892 (diff)
downloadlinux-1f08529c84cfecaf1261ed9b7e17fab18541c58f.tar.xz
ceph: add missing check in d_revalidate snapdir handling
We should not play with dcache without parent locked... 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>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 9f135624ae47..c07407586ce8 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -1434,6 +1434,7 @@ retry_lookup:
dout(" final dn %p\n", dn);
} else if ((req->r_op == CEPH_MDS_OP_LOOKUPSNAP ||
req->r_op == CEPH_MDS_OP_MKSNAP) &&
+ test_bit(CEPH_MDS_R_PARENT_LOCKED, &req->r_req_flags) &&
!test_bit(CEPH_MDS_R_ABORTED, &req->r_req_flags)) {
struct inode *dir = req->r_parent;