Re: [PATCH] ntfs3: provide block_invalidate_folio to fix memory leak

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

 



On Mon, May 30, 2022 at 08:57:15AM -0400, Mikulas Patocka wrote:
> In the kernel 5.17 and before, if the "invalidatepage" method is NULL, the 
> kernel will use block_invalidatepage (see do_invalidatepage). So, we don't 
> have to provide explicit "invalidatepage" in 5.17 and before and we don't 
> have to backport this bugfix there.
> 
> Note that the commit 7ba13abbd31e contains this piece of code:
> -#ifdef CONFIG_BLOCK
> -	if (!invalidatepage)
> -		invalidatepage = block_invalidatepage;
> -#endif
> 
> So, it explicitly breaks filesystems that have NULL invalidatepage and 
> NULL invalidate_folio and that relied on block_invalidatepage being called 
> implicitly. So, I believe this commit is the root cause of this bug.

Oh, right, I missed ntfs3 in that commit.  Oops.

Acked-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>





[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux