Skip to content

Commit 950b03d

Browse files
dhowellsbrauner
authored andcommitted
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: 92b6cc5 ("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]>
1 parent cce6bfa commit 950b03d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/netfs/io.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ static bool netfs_rreq_perform_resubmissions(struct netfs_io_request *rreq)
313313
netfs_reset_subreq_iter(rreq, subreq);
314314
netfs_read_from_server(rreq, subreq);
315315
} else if (test_bit(NETFS_SREQ_SHORT_IO, &subreq->flags)) {
316+
netfs_reset_subreq_iter(rreq, subreq);
316317
netfs_rreq_short_read(rreq, subreq);
317318
}
318319
}

0 commit comments

Comments
 (0)