diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 2d141a74ae82ec722d1efb799de168824b593722..eb51bd6201da0cd361d8265b4c6b0e3edee50ec9 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -323,7 +323,7 @@ nfs_file_fsync(struct file *file, int datasync) have_error |= test_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags); if (have_error) ret = xchg(&ctx->error, 0); - if (!ret) + if (!ret && status < 0) ret = status; return ret; }