diff options
author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2024-03-05 19:24:34 +0100 |
---|---|---|
committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2024-03-05 19:24:34 +0100 |
commit | e9c717bee8f109ec5f708297d2cc9d8b59348855 (patch) | |
tree | 00340b6767161ad779c7217e89850c60b506c119 /fs/netfs/direct_write.c | |
parent | 177f954f56bdfeef8a104a356a566389fefd2f95 (diff) | |
parent | 90d35da658da8cff0d4ecbb5113f5fac9d00eb72 (diff) |
Merge tag 'v6.8-rc7' into gpio/for-next
Linux 6.8-rc7
Diffstat (limited to 'fs/netfs/direct_write.c')
-rw-r--r-- | fs/netfs/direct_write.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/netfs/direct_write.c b/fs/netfs/direct_write.c index 60a40d293c87..bee047e20f5d 100644 --- a/fs/netfs/direct_write.c +++ b/fs/netfs/direct_write.c @@ -139,6 +139,9 @@ ssize_t netfs_unbuffered_write_iter(struct kiocb *iocb, struct iov_iter *from) _enter("%llx,%zx,%llx", iocb->ki_pos, iov_iter_count(from), i_size_read(inode)); + if (!iov_iter_count(from)) + return 0; + trace_netfs_write_iter(iocb, from); netfs_stat(&netfs_n_rh_dio_write); @@ -146,7 +149,7 @@ ssize_t netfs_unbuffered_write_iter(struct kiocb *iocb, struct iov_iter *from) if (ret < 0) return ret; ret = generic_write_checks(iocb, from); - if (ret < 0) + if (ret <= 0) goto out; ret = file_remove_privs(file); if (ret < 0) |