mirror of
https://github.com/torvalds/linux.git
synced 2026-11-20 13:03:48 +00:00
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:
@@ -269,6 +269,7 @@ abandon:
|
||||
__set_bit(NETFS_SREQ_FAILED, &subreq->flags);
|
||||
__clear_bit(NETFS_SREQ_NEED_RETRY, &subreq->flags);
|
||||
}
|
||||
netfs_wake_collector(rreq);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user