summaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2010-02-20 01:03:29 (GMT)
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-03-05 20:44:56 (GMT)
commit5cf95214ccb915591e2214f81de4659302d3e452 (patch)
tree3afcc0d8db911b117a3537846d81d5a5172827cc /fs/nfs
parent7f2f12d963e7c33a93bfb0b22f0178eb1e6a4196 (diff)
downloadlinux-5cf95214ccb915591e2214f81de4659302d3e452.tar.xz
NFS: Clean up nfs_sync_mapping
Remove the redundant call to filemap_write_and_wait(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/inode.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 443772df..e8b4117 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -114,16 +114,12 @@ void nfs_clear_inode(struct inode *inode)
*/
int nfs_sync_mapping(struct address_space *mapping)
{
- int ret;
+ int ret = 0;
- if (mapping->nrpages == 0)
- return 0;
- unmap_mapping_range(mapping, 0, 0, 0);
- ret = filemap_write_and_wait(mapping);
- if (ret != 0)
- goto out;
- ret = nfs_wb_all(mapping->host);
-out:
+ if (mapping->nrpages != 0) {
+ unmap_mapping_range(mapping, 0, 0, 0);
+ ret = nfs_wb_all(mapping->host);
+ }
return ret;
}