aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/inode.c')
-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 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 */
115int nfs_sync_mapping(struct address_space *mapping) 115int 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);
126out:
127 return ret; 123 return ret;
128} 124}
129 125