ceph: check if LOOKUPNAME request was aborted when filling trace
[linux-2.6-block.git] / fs / ceph / inode.c
index 46254d53392fe309027a1af97bb51c573a6c479e..79dd5e6ed7559568b666784cae7b728dee72ba1a 100644 (file)
@@ -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;