]> Git Repo - linux.git/commitdiff
netfs: Fix missing iterator reset on retry of short read
authorDavid Howells <[email protected]>
Fri, 23 Aug 2024 20:08:13 +0000 (21:08 +0100)
committerChristian Brauner <[email protected]>
Sat, 24 Aug 2024 14:09:17 +0000 (16:09 +0200)
Fix netfs_rreq_perform_resubmissions() to reset before retrying a short
read, otherwise the wrong part of the output buffer will be used.

Fixes: 92b6cc5d1e7c ("netfs: Add iov_iters to (sub)requests to describe various buffers")
Signed-off-by: David Howells <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
cc: Steve French <[email protected]>
cc: Paulo Alcantara <[email protected]>
cc: Jeff Layton <[email protected]>
cc: [email protected]
cc: [email protected]
cc: [email protected]
Signed-off-by: Christian Brauner <[email protected]>
fs/netfs/io.c

index 5367caf3fa28630cedf8364ac63ec3d1db7699ad..4da0a494e860f15e804144bb4f5cdc1a7dbbfe23 100644 (file)
@@ -313,6 +313,7 @@ static bool netfs_rreq_perform_resubmissions(struct netfs_io_request *rreq)
                        netfs_reset_subreq_iter(rreq, subreq);
                        netfs_read_from_server(rreq, subreq);
                } else if (test_bit(NETFS_SREQ_SHORT_IO, &subreq->flags)) {
+                       netfs_reset_subreq_iter(rreq, subreq);
                        netfs_rreq_short_read(rreq, subreq);
                }
        }
This page took 0.060805 seconds and 4 git commands to generate.