diff options
author | David Howells <[email protected]> | 2024-08-23 21:08:13 +0100 |
---|---|---|
committer | Christian Brauner <[email protected]> | 2024-08-24 16:09:17 +0200 |
commit | 950b03d0f664a54389a555d79215348ed413161f (patch) | |
tree | bf9c517fea0f8f0a2ce418cc7d60292089dd65de | |
parent | cce6bfa6ca0e30af9927b0074c97fe6a92f28092 (diff) |
netfs: Fix missing iterator reset on retry of short read
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]>
-rw-r--r-- | fs/netfs/io.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/netfs/io.c b/fs/netfs/io.c index 5367caf3fa28..4da0a494e860 100644 --- a/fs/netfs/io.c +++ b/fs/netfs/io.c @@ -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); } } |