linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ceph_fill_trace(): add missing check in d_revalidate snapdir handling
@ 2019-10-29 13:51 Al Viro
  0 siblings, 0 replies; 3+ messages in thread
From: Al Viro @ 2019-10-29 13:51 UTC (permalink / raw)
  To: ceph-devel; +Cc: linux-fsdevel

we should not play with dcache without parent locked...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

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 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req)
 		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;
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [PATCH] ceph_fill_trace(): add missing check in d_revalidate snapdir handling
@ 2019-10-29 13:53 Al Viro
  2019-10-30 13:49 ` Jeff Layton
  0 siblings, 1 reply; 3+ messages in thread
From: Al Viro @ 2019-10-29 13:53 UTC (permalink / raw)
  To: ceph-devel; +Cc: linux-fsdevel

[resent to correct address]

we should not play with dcache without parent locked...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

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 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req)
 		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;
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-30 13:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-29 13:51 [PATCH] ceph_fill_trace(): add missing check in d_revalidate snapdir handling Al Viro
  -- strict thread matches above, loose matches on Subject: below --
2019-10-29 13:53 Al Viro
2019-10-30 13:49 ` Jeff Layton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).