From: Yan, Zheng Date: Fri, 28 Sep 2018 03:34:42 +0000 (+0800) Subject: ceph: check if LOOKUPNAME request was aborted when filling trace X-Git-Tag: v5.15~7673^2~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=74c9e6bf4c888e41bc7db340fb94fade96394038;p=platform%2Fkernel%2Flinux-starfive.git ceph: check if LOOKUPNAME request was aborted when filling trace d_lookup()/d_alloc() require parent inode locked. Parent inode is not locked if request is aborted. Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov --- diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 46254d5..79dd5e6 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -1200,7 +1200,9 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req) WARN_ON_ONCE(1); } - if (dir && req->r_op == CEPH_MDS_OP_LOOKUPNAME) { + if (dir && req->r_op == CEPH_MDS_OP_LOOKUPNAME && + test_bit(CEPH_MDS_R_PARENT_LOCKED, &req->r_req_flags) && + !test_bit(CEPH_MDS_R_ABORTED, &req->r_req_flags)) { struct qstr dname; struct dentry *dn, *parent;