From: Matthew Wilcox <willy@infradead.org>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: manualinux@yahoo.es,
Konstantin Komarov <almaz.alexandrovich@paragon-software.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
ntfs3@lists.linux.dev, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] ntfs3: provide block_invalidate_folio to fix memory leak
Date: Mon, 30 May 2022 13:18:25 +0100 [thread overview]
Message-ID: <YpS2EX+lHkqaxh0d@casper.infradead.org> (raw)
In-Reply-To: <alpine.LRH.2.02.2205300746310.21817@file01.intranet.prod.int.rdu2.redhat.com>
On Mon, May 30, 2022 at 08:00:12AM -0400, Mikulas Patocka wrote:
> 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.
>
> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> Reported-by: José Luis Lara Carrascal <manualinux@yahoo.es>
> Fixes: 7ba13abbd31e ("fs: Turn block_invalidatepage into block_invalidate_folio")
That commit is innocent here. Rather, this should be:
Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block")
Yes, trees before 7ba13abbd31e will need to change the patch to add
invalidate_page instead of invalidate_folio, but that's a normal part
of the process.
> Cc: stable@vger.kernel.org # v5.18
>
> ---
> fs/ntfs3/inode.c | 1 +
> 1 file changed, 1 insertion(+)
>
> Index: linux-2.6/fs/ntfs3/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/ntfs3/inode.c 2022-05-16 16:57:24.000000000 +0200
> +++ linux-2.6/fs/ntfs3/inode.c 2022-05-30 13:36:45.000000000 +0200
> @@ -1951,6 +1951,7 @@ const struct address_space_operations nt
> .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 = {
next prev parent reply other threads:[~2022-05-30 12:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220524075112.5438df32.ref@yahoo.es>
[not found] ` <20220524075112.5438df32@yahoo.es>
[not found] ` <alpine.LRH.2.02.2205240501130.17784@file01.intranet.prod.int.rdu2.redhat.com>
[not found] ` <20220524113314.71fe17f0@yahoo.es>
[not found] ` <20220525130538.38fd3d35@yahoo.es>
[not found] ` <20220527072629.332b078d@yahoo.es>
[not found] ` <20220527080211.15d631be@yahoo.es>
[not found] ` <alpine.LRH.2.02.2205271338250.20527@file01.intranet.prod.int.rdu2.redhat.com>
[not found] ` <20220528061836.22230f86@yahoo.es>
[not found] ` <20220530131524.7fb5640d@yahoo.es>
2022-05-30 12:00 ` [PATCH] ntfs3: provide block_invalidate_folio to fix memory leak Mikulas Patocka
2022-05-30 12:18 ` Matthew Wilcox [this message]
2022-05-30 12:57 ` Mikulas Patocka
2022-05-30 13:53 ` Matthew Wilcox
2022-05-30 14:00 ` Namjae Jeon
2022-06-01 10:35 ` Konstantin Komarov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YpS2EX+lHkqaxh0d@casper.infradead.org \
--to=willy@infradead.org \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=manualinux@yahoo.es \
--cc=mpatocka@redhat.com \
--cc=ntfs3@lists.linux.dev \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).