]> Git Repo - J-linux.git/commitdiff
fs/ntfs3: provide block_invalidate_folio to fix memory leak
authorMikulas Patocka <[email protected]>
Mon, 30 May 2022 11:36:45 +0000 (13:36 +0200)
committerKonstantin Komarov <[email protected]>
Wed, 1 Jun 2022 10:10:19 +0000 (13:10 +0300)
The ntfs3 filesystem lacks the 'invalidate_folio' method and it causes
memory leak. If you write to the filesystem and then unmount it, the
cached written data are not freed and they are permanently leaked.
Fixes: 7ba13abbd31e ("fs: Turn block_invalidatepage into block_invalidate_folio")
Reported-by: José Luis Lara Carrascal <[email protected]>
Signed-off-by: Mikulas Patocka <[email protected]>
Acked-by: Matthew Wilcox (Oracle) <[email protected]>
Reviewed-by: Namjae Jeon <[email protected]>
Signed-off-by: Konstantin Komarov <[email protected]>
Cc: [email protected] # v5.18
fs/ntfs3/inode.c

index 76519c72a970fcbf1c8cebef56d4e81975d5c6c0..38045264a61bd1f2ae728233503d1c8febfa205f 100644 (file)
@@ -1955,6 +1955,7 @@ const struct address_space_operations ntfs_aops = {
        .direct_IO      = ntfs_direct_IO,
        .bmap           = ntfs_bmap,
        .dirty_folio    = block_dirty_folio,
+       .invalidate_folio = block_invalidate_folio,
 };
 
 const struct address_space_operations ntfs_aops_cmpr = {
This page took 0.055266 seconds and 4 git commands to generate.