From d1bb754ab9e775b0fbb2743d3df425c25a561114 Mon Sep 17 00:00:00 2001 From: Paulo Alcantara Date: Thu, 5 Nov 2026 21:01:54 -0300 Subject: [PATCH] netfs: don't hang a read whose retry is abandoned When ->prepare_read() fails while retrying a read, or a subrequest can't be allocated, netfs_retry_read_subrequests() marks the remaining subrequests failed without reissuing them. If none was reissued in that pass, nothing is in progress any more to wake the collector, which returned after the retry, so an offloaded read (readahead, async direct I/O) never completes and its folios stay locked. Wake the collector after abandoning, so it collects the failed subrequests and completes the request. Fixes: e2d46f2ec332 ("netfs: Change the read result collector to only use one work item") Reviewed-by: David Howells Signed-off-by: Paulo Alcantara Cc: stable@vger.kernel.org --- fs/netfs/read_retry.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/netfs/read_retry.c b/fs/netfs/read_retry.c index 8a722995fa9d..bfaaebea12df 100644 --- a/fs/netfs/read_retry.c +++ b/fs/netfs/read_retry.c @@ -269,6 +269,7 @@ abandon: __set_bit(NETFS_SREQ_FAILED, &subreq->flags); __clear_bit(NETFS_SREQ_NEED_RETRY, &subreq->flags); } + netfs_wake_collector(rreq); } /*