On Thu, Jan 28, 2021 at 07:25:08PM +0800, Qu Wenruo wrote:
> In read_extent_buffer_pages(), if we failed to lock the page atomically,
> we just exit with return value 0.
> 
> This is pretty counter-intuitive, as normally if we can't lock what we
> need, we would return something like -EAGAIN.
> 
> But the that return hides under (wait == WAIT_NONE) branch, which only
> get triggered for readahead.
> 
> And for readahead, if we failed to lock the page, it means the extent
> buffer is either being read by other thread, or has been read and is
> under modification.
> Either way the eb will or has been cached, thus readahead has no need to
> wait for it.
> 
> This patch will add extra comment on this counter-intuitive behavior.
> 
> Reported-by: Dan Carpenter <[email protected]>
> Signed-off-by: Qu Wenruo <[email protected]>

Added to misc-next, thanks, I've slightly rephrased the subject.

Reply via email to