aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 606ef0f20aed..c43a452f7da2 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -272,13 +272,13 @@ nfs_file_fsync(struct file *file, loff_t start, loff_t end, int datasync)
272 datasync); 272 datasync);
273 273
274 ret = filemap_write_and_wait_range(inode->i_mapping, start, end); 274 ret = filemap_write_and_wait_range(inode->i_mapping, start, end);
275 if (ret)
276 return ret;
277 mutex_lock(&inode->i_mutex); 275 mutex_lock(&inode->i_mutex);
278 276
279 nfs_inc_stats(inode, NFSIOS_VFSFSYNC); 277 nfs_inc_stats(inode, NFSIOS_VFSFSYNC);
280 have_error = test_and_clear_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags); 278 have_error = test_and_clear_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags);
281 status = nfs_commit_inode(inode, FLUSH_SYNC); 279 status = nfs_commit_inode(inode, FLUSH_SYNC);
280 if (status >= 0 && ret < 0)
281 status = ret;
282 have_error |= test_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags); 282 have_error |= test_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags);
283 if (have_error) 283 if (have_error)
284 ret = xchg(&ctx->error, 0); 284 ret = xchg(&ctx->error, 0);