Skip to content

Commit 724bbe4

Browse files
Mikulas Patockaaalexandrovich
authored andcommitted
fs/ntfs3: provide block_invalidate_folio to fix memory leak
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: 7ba13ab ("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
1 parent f26967b commit 724bbe4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/ntfs3/inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1955,6 +1955,7 @@ const struct address_space_operations ntfs_aops = {
19551955
.direct_IO = ntfs_direct_IO,
19561956
.bmap = ntfs_bmap,
19571957
.dirty_folio = block_dirty_folio,
1958+
.invalidate_folio = block_invalidate_folio,
19581959
};
19591960

19601961
const struct address_space_operations ntfs_aops_cmpr = {

0 commit comments

Comments
 (0)