diff options
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/inode.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 193bfa5e9cbd..60456361e07d 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c | |||
@@ -1030,9 +1030,6 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req, | |||
1030 | dout("fill_trace doing d_move %p -> %p\n", | 1030 | dout("fill_trace doing d_move %p -> %p\n", |
1031 | req->r_old_dentry, dn); | 1031 | req->r_old_dentry, dn); |
1032 | 1032 | ||
1033 | /* d_move screws up d_subdirs order */ | ||
1034 | ceph_i_clear(dir, CEPH_I_COMPLETE); | ||
1035 | |||
1036 | d_move(req->r_old_dentry, dn); | 1033 | d_move(req->r_old_dentry, dn); |
1037 | dout(" src %p '%.*s' dst %p '%.*s'\n", | 1034 | dout(" src %p '%.*s' dst %p '%.*s'\n", |
1038 | req->r_old_dentry, | 1035 | req->r_old_dentry, |
@@ -1044,12 +1041,15 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req, | |||
1044 | rehashing bug in vfs_rename_dir */ | 1041 | rehashing bug in vfs_rename_dir */ |
1045 | ceph_invalidate_dentry_lease(dn); | 1042 | ceph_invalidate_dentry_lease(dn); |
1046 | 1043 | ||
1047 | /* take overwritten dentry's readdir offset */ | 1044 | /* |
1048 | dout("dn %p gets %p offset %lld (old offset %lld)\n", | 1045 | * d_move() puts the renamed dentry at the end of |
1049 | req->r_old_dentry, dn, ceph_dentry(dn)->offset, | 1046 | * d_subdirs. We need to assign it an appropriate |
1047 | * directory offset so we can behave when holding | ||
1048 | * I_COMPLETE. | ||
1049 | */ | ||
1050 | ceph_set_dentry_offset(req->r_old_dentry); | ||
1051 | dout("dn %p gets new offset %lld\n", req->r_old_dentry, | ||
1050 | ceph_dentry(req->r_old_dentry)->offset); | 1052 | ceph_dentry(req->r_old_dentry)->offset); |
1051 | ceph_dentry(req->r_old_dentry)->offset = | ||
1052 | ceph_dentry(dn)->offset; | ||
1053 | 1053 | ||
1054 | dn = req->r_old_dentry; /* use old_dentry */ | 1054 | dn = req->r_old_dentry; /* use old_dentry */ |
1055 | in = dn->d_inode; | 1055 | in = dn->d_inode; |