Skip to content

Commit d98b7d7

Browse files
dhowellsbrauner
authored andcommitted
netfs: Fix io_uring based write-through
[This was included in v2 of 9b038d0, 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: 288ace2 ("netfs: New writeback implementation") Signed-off-by: David Howells <dhowells@redhat.com> cc: Jeff Layton <jlayton@kernel.org> cc: Steve French <stfrench@microsoft.com> cc: Enzo Matsumiya <ematsumiya@suse.de> cc: Christian Brauner <brauner@kernel.org> cc: netfs@lists.linux.dev cc: v9fs@lists.linux.dev cc: linux-afs@lists.infradead.org cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/20240620173137.610345-2-dhowells@redhat.com Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent 7d1cf5e commit d98b7d7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

fs/netfs/direct_write.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,9 @@ ssize_t netfs_unbuffered_write_iter_locked(struct kiocb *iocb, struct iov_iter *
9292
__set_bit(NETFS_RREQ_UPLOAD_TO_SERVER, &wreq->flags);
9393
if (async)
9494
wreq->iocb = iocb;
95+
wreq->len = iov_iter_count(&wreq->io_iter);
9596
wreq->cleanup = netfs_cleanup_dio_write;
96-
ret = netfs_unbuffered_write(wreq, is_sync_kiocb(iocb), iov_iter_count(&wreq->io_iter));
97+
ret = netfs_unbuffered_write(wreq, is_sync_kiocb(iocb), wreq->len);
9798
if (ret < 0) {
9899
_debug("begin = %zd", ret);
99100
goto out;

0 commit comments

Comments
 (0)