提交 74c9e6bf 编写于 作者: Y Yan, Zheng 提交者: Ilya Dryomov

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: N"Yan, Zheng" <zyan@redhat.com>
Reviewed-by: NJeff Layton <jlayton@redhat.com>
Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
上级 c58f450b
...@@ -1200,7 +1200,9 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req) ...@@ -1200,7 +1200,9 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req)
WARN_ON_ONCE(1); 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 qstr dname;
struct dentry *dn, *parent; struct dentry *dn, *parent;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册