|
@@ -323,7 +323,7 @@ nfs_file_fsync(struct file *file, int datasync)
|
|
have_error |= test_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags);
|
|
have_error |= test_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags);
|
|
if (have_error)
|
|
if (have_error)
|
|
ret = xchg(&ctx->error, 0);
|
|
ret = xchg(&ctx->error, 0);
|
|
- if (!ret)
|
|
|
|
|
|
+ if (!ret && status < 0)
|
|
ret = status;
|
|
ret = status;
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|