fs/9p: Workaround vfs rename rehash bug
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Mon, 28 Feb 2011 11:34:08 +0000 (17:04 +0530)
committerEric Van Hensbergen <ericvh@gmail.com>
Tue, 15 Mar 2011 14:57:41 +0000 (09:57 -0500)
This is similar to what ceph, ocfs2 and nfs does
http://kerneltrap.org/mailarchive/linux-fsdevel/2008/4/18/1498534

May be we should get vfs fixed

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>

fs/9p/vfs_inode.c

index c072bb9..8e9d603 100644 (file)
@@ -884,6 +884,11 @@ clunk_newdir:
                                clear_nlink(new_inode);
                        else
                                drop_nlink(new_inode);
+                       /*
+                        * Work around vfs rename rehash bug with
+                        * FS_RENAME_DOES_D_MOVE
+                        */
+                       v9fs_invalidate_inode_attr(new_inode);
                }
                if (S_ISDIR(old_inode->i_mode)) {
                        if (!new_inode)