aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Howells <[email protected]>2024-05-20 16:12:56 +0100
committerChristian Brauner <[email protected]>2024-06-26 14:15:26 +0200
commitd98b7d7dda721ca009b6dc5dd3beeeb7fd46f4b4 (patch)
treeb01afc33f66d42204037f399cda24db5148259f6
parent7d1cf5e624ef5d81b933e8b7f4927531166c0f7a (diff)
netfs: Fix io_uring based write-through
[This was included in v2 of 9b038d004ce95551cb35381c49fe896c5bc11ffe, but v1 got pushed instead] Fix netfs_unbuffered_write_iter_locked() to set the total request length in the netfs_io_request struct rather than leaving it as zero. Fixes: 288ace2f57c9 ("netfs: New writeback implementation") Signed-off-by: David Howells <[email protected]> cc: Jeff Layton <[email protected]> cc: Steve French <[email protected]> cc: Enzo Matsumiya <[email protected]> cc: Christian Brauner <[email protected]> cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>
-rw-r--r--fs/netfs/direct_write.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/netfs/direct_write.c b/fs/netfs/direct_write.c
index e14cd53ac9fd..88f2adfab75e 100644
--- a/fs/netfs/direct_write.c
+++ b/fs/netfs/direct_write.c
@@ -92,8 +92,9 @@ ssize_t netfs_unbuffered_write_iter_locked(struct kiocb *iocb, struct iov_iter *
__set_bit(NETFS_RREQ_UPLOAD_TO_SERVER, &wreq->flags);
if (async)
wreq->iocb = iocb;
+ wreq->len = iov_iter_count(&wreq->io_iter);
wreq->cleanup = netfs_cleanup_dio_write;
- ret = netfs_unbuffered_write(wreq, is_sync_kiocb(iocb), iov_iter_count(&wreq->io_iter));
+ ret = netfs_unbuffered_write(wreq, is_sync_kiocb(iocb), wreq->len);
if (ret < 0) {
_debug("begin = %zd", ret);
goto out;