Last active
February 1, 2017 21:43
-
-
Save tuxoko/9fb1f59717770de9d43d6d6f7c7a29c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/module/zfs/zpl_file.c b/module/zfs/zpl_file.c | |
index 75a3b55..54b93e7 100644 | |
--- a/module/zfs/zpl_file.c | |
+++ b/module/zfs/zpl_file.c | |
@@ -387,6 +387,8 @@ zpl_iter_write(struct kiocb *kiocb, struct iov_iter *from) | |
count = iov_iter_count(from); | |
ret = generic_write_checks(file, &kiocb->ki_pos, &count, isblk); | |
+ if (ret < 0) | |
+ return (ret); | |
#else | |
/* | |
* XXX - ideally this check should be in the same lock region with | |
@@ -395,9 +397,9 @@ zpl_iter_write(struct kiocb *kiocb, struct iov_iter *from) | |
*/ | |
ret = generic_write_checks(kiocb, from); | |
count = ret; | |
-#endif | |
if (ret <= 0) | |
return (ret); | |
+#endif | |
if (from->type & ITER_KVEC) | |
seg = UIO_SYSSPACE; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment