summaryrefslogtreecommitdiff
path: root/fs/ceph/inode.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-12-21 22:42:18 +0300
committerSage Weil <sage@newdream.net>2009-12-22 03:39:57 +0300
commitc4a29f26d50bea65809ca670992108a33aa2efa6 (patch)
tree20b6c85cd3d92792e855d990aca3504dbe20d294 /fs/ceph/inode.c
parent2baba25019ec564cd247af74013873d69a0b8190 (diff)
downloadlinux-c4a29f26d50bea65809ca670992108a33aa2efa6.tar.xz
ceph: ensure rename target dentry fails revalidation
This works around a bug in vfs_rename_dir() that rehashes the target dentry. Ensure such dentries always fail revalidation by timing out the dentry lease and kicking it out of the current directory lease gen. This can be reverted when the vfs bug is fixed. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/inode.c')
-rw-r--r--fs/ceph/inode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index db684686f48a..8774b2811597 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -939,6 +939,10 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req,
req->r_old_dentry->d_name.len,
req->r_old_dentry->d_name.name,
dn, dn->d_name.len, dn->d_name.name);
+ /* ensure target dentry is invalidated, despite
+ rehashing bug in vfs_rename_dir */
+ dn->d_time = jiffies;
+ ceph_dentry(dn)->lease_shared_gen = 0;
/* take overwritten dentry's readdir offset */
ceph_dentry(req->r_old_dentry)->offset =
ceph_dentry(dn)->offset;