summaryrefslogtreecommitdiff
path: root/fs/nfs/file.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-19 09:12:41 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-19 09:12:41 +0200
commitc51f2ff0075b77f272da93b7155aa666a77c8fe7 (patch)
treef229265a8d4b0407f2eaaa4fb6d1afb86ac380c5 /fs/nfs/file.c
parenteddde288957957d45c42fcf51af9a059de7e0887 (diff)
parent3be7988674ab33565700a37b210f502563d932e6 (diff)
Merge 4.8-rc7 into usb-next
We want/need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r--fs/nfs/file.c5
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 */