diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2016-10-06 10:56:43 +0300 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2016-10-06 10:56:43 +0300 |
commit | 301a36fa700f9add6e14f5a95c7573e01578343a (patch) | |
tree | 6ff94ff3b08b838353b9127eb5f8055b3de6b25f /fs/nfs/file.c | |
parent | b828f960215f02e5d2c88bbd27565c694254a15a (diff) | |
parent | b60752f2b20c167859943e001727f0d4da419b23 (diff) | |
download | linux-301a36fa700f9add6e14f5a95c7573e01578343a.tar.xz |
Merge branches 'misc' and 'sa1111-base' into for-linus
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r-- | fs/nfs/file.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 7d620970f2e1..ca699ddc11c1 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -657,7 +657,10 @@ ssize_t nfs_file_write(struct kiocb *iocb, struct iov_iter *from) if (result <= 0) goto out; - written = generic_write_sync(iocb, result); + result = generic_write_sync(iocb, result); + if (result < 0) + goto out; + written = result; iocb->ki_pos += written; /* Return error values */ |