aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ceph/inode.c')
-rw-r--r--fs/ceph/inode.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 85b4d2ffdeba..220a2aec0545 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -938,8 +938,15 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req,
938 ceph_inode(req->r_locked_dir); 938 ceph_inode(req->r_locked_dir);
939 dout(" clearing %p complete (empty trace)\n", 939 dout(" clearing %p complete (empty trace)\n",
940 req->r_locked_dir); 940 req->r_locked_dir);
941 spin_lock(&req->r_locked_dir->i_lock);
941 ci->i_ceph_flags &= ~CEPH_I_COMPLETE; 942 ci->i_ceph_flags &= ~CEPH_I_COMPLETE;
942 ci->i_release_count++; 943 ci->i_release_count++;
944 spin_unlock(&req->r_locked_dir->i_lock);
945
946 if (req->r_dentry)
947 ceph_invalidate_dentry_lease(req->r_dentry);
948 if (req->r_old_dentry)
949 ceph_invalidate_dentry_lease(req->r_old_dentry);
943 } 950 }
944 return 0; 951 return 0;
945 } 952 }
@@ -1011,13 +1018,15 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req,
1011 req->r_old_dentry->d_name.len, 1018 req->r_old_dentry->d_name.len,
1012 req->r_old_dentry->d_name.name, 1019 req->r_old_dentry->d_name.name,
1013 dn, dn->d_name.len, dn->d_name.name); 1020 dn, dn->d_name.len, dn->d_name.name);
1021
1014 /* ensure target dentry is invalidated, despite 1022 /* ensure target dentry is invalidated, despite
1015 rehashing bug in vfs_rename_dir */ 1023 rehashing bug in vfs_rename_dir */
1016 dn->d_time = jiffies; 1024 ceph_invalidate_dentry_lease(dn);
1017 ceph_dentry(dn)->lease_shared_gen = 0; 1025
1018 /* take overwritten dentry's readdir offset */ 1026 /* take overwritten dentry's readdir offset */
1019 ceph_dentry(req->r_old_dentry)->offset = 1027 ceph_dentry(req->r_old_dentry)->offset =
1020 ceph_dentry(dn)->offset; 1028 ceph_dentry(dn)->offset;
1029
1021 dn = req->r_old_dentry; /* use old_dentry */ 1030 dn = req->r_old_dentry; /* use old_dentry */
1022 in = dn->d_inode; 1031 in = dn->d_inode;
1023 } 1032 }