diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-02-19 20:03:29 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-03-05 15:44:56 -0500 |
commit | 5cf95214ccb915591e2214f81de4659302d3e452 (patch) | |
tree | 3afcc0d8db911b117a3537846d81d5a5172827cc | |
parent | 7f2f12d963e7c33a93bfb0b22f0178eb1e6a4196 (diff) |
NFS: Clean up nfs_sync_mapping
Remove the redundant call to filemap_write_and_wait().
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r-- | fs/nfs/inode.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 443772df9b17..e8b41170d295 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -114,16 +114,12 @@ void nfs_clear_inode(struct inode *inode) | |||
114 | */ | 114 | */ |
115 | int nfs_sync_mapping(struct address_space *mapping) | 115 | int nfs_sync_mapping(struct address_space *mapping) |
116 | { | 116 | { |
117 | int ret; | 117 | int ret = 0; |
118 | 118 | ||
119 | if (mapping->nrpages == 0) | 119 | if (mapping->nrpages != 0) { |
120 | return 0; | 120 | unmap_mapping_range(mapping, 0, 0, 0); |
121 | unmap_mapping_range(mapping, 0, 0, 0); | 121 | ret = nfs_wb_all(mapping->host); |
122 | ret = filemap_write_and_wait(mapping); | 122 | } |
123 | if (ret != 0) | ||
124 | goto out; | ||
125 | ret = nfs_wb_all(mapping->host); | ||
126 | out: | ||
127 | return ret; | 123 | return ret; |
128 | } | 124 | } |
129 | 125 | ||