[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250605145152.9ae3edb99f29ef46b30096e4@linux-foundation.org>
Date: Thu, 5 Jun 2025 14:51:52 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Jan Kara <jack@...e.cz>
Cc: Chi Zhiling <chizhiling@....com>, willy@...radead.org,
josef@...icpanda.com, linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Chi Zhiling <chizhiling@...inos.cn>
Subject: Re: [PATCH] readahead: fix return value of page_cache_next_miss()
when no hole is found
On Thu, 5 Jun 2025 10:22:23 +0200 Jan Kara <jack@...e.cz> wrote:
> On Thu 05-06-25 13:49:35, Chi Zhiling wrote:
> > From: Chi Zhiling <chizhiling@...inos.cn>
> >
> > max_scan in page_cache_next_miss always decreases to zero when no hole
> > is found, causing the return value to be index + 0.
> >
> > Fix this by preserving the max_scan value throughout the loop.
> >
> > Fixes: 901a269ff3d5 ("filemap: fix page_cache_next_miss() when no hole found")
> > Signed-off-by: Chi Zhiling <chizhiling@...inos.cn>
>
> Indeed. Thanks for catching this. Don't know how I missed that. Feel free
> to add:
>
> Reviewed-by: Jan Kara <jack@...e.cz>
>
Thanks. It's a simple patch - do we expect it to have significant
runtime effects?
Powered by blists - more mailing lists