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: e2d46f2ec3 ("netfs: Change the read result collector to only use one work item")
Reviewed-by: David Howells <[email protected]>
Signed-off-by: Paulo Alcantara <[email protected]>
Cc: [email protected]
This commit is contained in:
Paulo Alcantara
2026-11-09 12:35:35 -03:00
parent d88a0c3a96
commit d1bb754ab9
+1
View File
@@ -269,6 +269,7 @@ abandon:
__set_bit(NETFS_SREQ_FAILED, &subreq->flags);
__clear_bit(NETFS_SREQ_NEED_RETRY, &subreq->flags);
}
netfs_wake_collector(rreq);
}
/*