diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2019-10-29 14:53:29 +0100 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2019-10-29 22:29:55 +0100 |
commit | 1f08529c84cfecaf1261ed9b7e17fab18541c58f (patch) | |
tree | 0a41af995c4c3d7259ea69de0413b2e8cfc4a7f8 | |
parent | ceph: fix RCU case handling in ceph_d_revalidate() (diff) | |
download | linux-1f08529c84cfecaf1261ed9b7e17fab18541c58f.tar.xz linux-1f08529c84cfecaf1261ed9b7e17fab18541c58f.zip |
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>
-rw-r--r-- | fs/ceph/inode.c | 1 |
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; |