diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2022-05-30 13:36:45 +0200 |
---|---|---|
committer | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2022-06-01 13:10:19 +0300 |
commit | 724bbe49c5e427cb077357d72d240a649f2e4054 (patch) | |
tree | ca60d667c136dc79e97f607786db8077656b83c2 /fs/ntfs3/inode.c | |
parent | f26967b9f7a830e228bb13fb41bd516ddd9d789d (diff) | |
download | linux-rpi-724bbe49c5e427cb077357d72d240a649f2e4054.tar.gz linux-rpi-724bbe49c5e427cb077357d72d240a649f2e4054.tar.bz2 linux-rpi-724bbe49c5e427cb077357d72d240a649f2e4054.zip |
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: 7ba13abbd31e ("fs: Turn block_invalidatepage into block_invalidate_folio")
Reported-by: José Luis Lara Carrascal <manualinux@yahoo.es>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Acked-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Cc: stable@vger.kernel.org # v5.18
Diffstat (limited to 'fs/ntfs3/inode.c')
-rw-r--r-- | fs/ntfs3/inode.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c index 76519c72a970..38045264a61b 100644 --- a/fs/ntfs3/inode.c +++ b/fs/ntfs3/inode.c @@ -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 = { |