aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-01-13 02:28:12 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-02-03 18:35:04 -0500
commitccfeb506231348a3c60ab0fdb5753a574653e3c0 (patch)
tree17e2261c396d927e389c7f018008e5537bc27ddb /fs/nfs
parentab91f264cfbafd079dcb1bd02e9803c2dd65de19 (diff)
NFS: Fix up "rm -rf"...
When a file is being scheduled for deletion by means of the sillyrename mechanism, it makes sense to start out writeback of the dirty data as soon as possible in order to ensure that the delete can occur. Examples of cases where this is an issue include "rm -rf", which will busy-wait until the file is closed, and the sillyrename completes. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/dir.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index d9ba8cb0ee75..bd269d268824 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1443,6 +1443,8 @@ static int nfs_unlink(struct inode *dir, struct dentry *dentry)
1443 if (atomic_read(&dentry->d_count) > 1) { 1443 if (atomic_read(&dentry->d_count) > 1) {
1444 spin_unlock(&dentry->d_lock); 1444 spin_unlock(&dentry->d_lock);
1445 spin_unlock(&dcache_lock); 1445 spin_unlock(&dcache_lock);
1446 /* Start asynchronous writeout of the inode */
1447 write_inode_now(dentry->d_inode, 0);
1446 error = nfs_sillyrename(dir, dentry); 1448 error = nfs_sillyrename(dir, dentry);
1447 unlock_kernel(); 1449 unlock_kernel();
1448 return error; 1450 return error;