From c9f7868c45a0a5aaaef9e744d2792b5c59df7be6 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Wed, 16 Nov 2011 11:46:31 +1100 Subject: [PATCH] --- yaml --- r: 282932 b: refs/heads/master c: 2edb6bc3852c681c0d948245bd55108dc6407604 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/nfs/file.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 44bd9959d75d..867df3ba3eb0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 43717c7daebf10b43f12e68512484b3095bb1ba5 +refs/heads/master: 2edb6bc3852c681c0d948245bd55108dc6407604 diff --git a/trunk/fs/nfs/file.c b/trunk/fs/nfs/file.c index 606ef0f20aed..c43a452f7da2 100644 --- a/trunk/fs/nfs/file.c +++ b/trunk/fs/nfs/file.c @@ -272,13 +272,13 @@ nfs_file_fsync(struct file *file, loff_t start, loff_t end, int datasync) datasync); ret = filemap_write_and_wait_range(inode->i_mapping, start, end); - if (ret) - return ret; mutex_lock(&inode->i_mutex); nfs_inc_stats(inode, NFSIOS_VFSFSYNC); have_error = test_and_clear_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags); status = nfs_commit_inode(inode, FLUSH_SYNC); + if (status >= 0 && ret < 0) + status = ret; have_error |= test_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags); if (have_error) ret = xchg(&ctx->error, 0);