summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2010-07-31 20:29:06 +0200
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-08-04 04:06:40 +0200
commit1b924e5f878e3cd62a20bd8dbf3b911a40185a99 (patch)
treea24a76be037ee49900611eb9b3883adf22410236 /fs/nfs
parentNFS: Fix up the fsync code (diff)
downloadlinux-1b924e5f878e3cd62a20bd8dbf3b911a40185a99.tar.xz
linux-1b924e5f878e3cd62a20bd8dbf3b911a40185a99.zip
NFS: Clean up the callers of nfs_wb_all()
There is no need to flush out writes before calling nfs_wb_all(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/delegation.c10
-rw-r--r--fs/nfs/inode.c4
2 files changed, 2 insertions, 12 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index f34f4ac52b81..b9c3c43cea1d 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -268,14 +268,6 @@ out:
return status;
}
-/* Sync all data to disk upon delegation return */
-static void nfs_msync_inode(struct inode *inode)
-{
- filemap_fdatawrite(inode->i_mapping);
- nfs_wb_all(inode);
- filemap_fdatawait(inode->i_mapping);
-}
-
/*
* Basic procedure for returning a delegation to the server
*/
@@ -367,7 +359,7 @@ int nfs_inode_return_delegation(struct inode *inode)
delegation = nfs_detach_delegation_locked(nfsi, NULL, clp);
spin_unlock(&clp->cl_lock);
if (delegation != NULL) {
- nfs_msync_inode(inode);
+ nfs_wb_all(inode);
err = __nfs_inode_return_delegation(inode, delegation, 1);
}
}
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index ec7a8f96a2c2..581d8f081e68 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -413,10 +413,8 @@ nfs_setattr(struct dentry *dentry, struct iattr *attr)
return 0;
/* Write all dirty data */
- if (S_ISREG(inode->i_mode)) {
- filemap_write_and_wait(inode->i_mapping);
+ if (S_ISREG(inode->i_mode))
nfs_wb_all(inode);
- }
fattr = nfs_alloc_fattr();
if (fattr == NULL)