NFS: nfs_rename() should not have to flush out writebacks
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Sat, 31 Jul 2010 18:29:06 +0000 (14:29 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 4 Aug 2010 02:06:41 +0000 (22:06 -0400)
We don't really support nfs servers that invalidate the file handle after a
rename, so precautions such as flushing out dirty data before renaming the
file are superfluous.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/dir.c

index 782b431ef91c9f521f18d5eeba5a33fbceb5b612..067a051397ba58a746b5e674bd81360471a854aa 100644 (file)
@@ -1652,16 +1652,7 @@ static int nfs_rename(struct inode *old_dir, struct dentry *old_dentry,
                }
        }
 
-       /*
-        * ... prune child dentries and writebacks if needed.
-        */
-       if (atomic_read(&old_dentry->d_count) > 1) {
-               if (S_ISREG(old_inode->i_mode))
-                       nfs_wb_all(old_inode);
-               shrink_dcache_parent(old_dentry);
-       }
        nfs_inode_return_delegation(old_inode);
-
        if (new_inode != NULL)
                nfs_inode_return_delegation(new_inode);