Re: [PATCH] readahead: fix return value of page_cache_next_miss() when no hole is found

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 5 Jun 2025 10:22:23 +0200 Jan Kara <jack@xxxxxxx> wrote:

> On Thu 05-06-25 13:49:35, Chi Zhiling wrote:
> > From: Chi Zhiling <chizhiling@xxxxxxxxxx>
> > 
> > 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@xxxxxxxxxx>
> 
> Indeed. Thanks for catching this. Don't know how I missed that. Feel free
> to add:
> 
> Reviewed-by: Jan Kara <jack@xxxxxxx>
> 

Thanks.  It's a simple patch - do we expect it to have significant
runtime effects?





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux