From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: linux-s390@vger.kernel.org
Subject: Re: [PATCH] btrfs: fix the folio leak on S390 hardware acceleration
Date: Wed, 21 Jan 2026 09:22:47 +1030 [thread overview]
Message-ID: <1218d786-ad7a-4971-9cd5-273232f62d79@suse.com> (raw)
In-Reply-To: <bcf36edfb7ac3caf3373174e741bb29c0feb268b.1768802004.git.wqu@suse.com>
Adding S390 to the mailing list, I got the incorrect address in the
initial patch.
Much appreciated if S390 people can give it a test.
Thanks,
Qu
在 2026/1/19 16:24, Qu Wenruo 写道:
> [BUG]
> After commit aa60fe12b4f4 ("btrfs: zlib: refactor S390x HW acceleration
> buffer preparation"), we no longer release the folio of the page cache
> of folio returned by btrfs_compress_filemap_get_folio() for S390
> hardware accerlation path.
>
> [CAUSE]
> Before that commit, we call kumap_local() and folio_put() after handling
> each folio.
>
> Although the timing is not ideal (it release previous folio at the
> beginning of the loop, and rely on some extra cleanup out of the loop),
> it at least handles the folio release correctly.
>
> Meanwhile the refactored code is easier to read, it lacks the call to
> release the filemap folio.
>
> [FIX]
> Add the missing folio_put() for copy_data_into_buffer().
>
> Cc: linux-s390@vger.kernel.orgaa60fe12b4f49f49fc73e5023f8675e2df1f7805
> Fixes: aa60fe12b4f4 ("btrfs: zlib: refactor S390x HW acceleration buffer preparation")
> Signed-off-by: Qu Wenruo <wqu@suse.com>
> ---
> fs/btrfs/zlib.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/btrfs/zlib.c b/fs/btrfs/zlib.c
> index 6caba8be7c84..10ed48d4a846 100644
> --- a/fs/btrfs/zlib.c
> +++ b/fs/btrfs/zlib.c
> @@ -139,6 +139,7 @@ static int copy_data_into_buffer(struct address_space *mapping,
> data_in = kmap_local_folio(folio, offset);
> memcpy(workspace->buf + cur - filepos, data_in, copy_length);
> kunmap_local(data_in);
> + folio_put(folio);
> cur += copy_length;
> }
> return 0;
next parent reply other threads:[~2026-01-20 22:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bcf36edfb7ac3caf3373174e741bb29c0feb268b.1768802004.git.wqu@suse.com>
2026-01-20 22:52 ` Qu Wenruo [this message]
2026-01-21 9:28 ` [PATCH] btrfs: fix the folio leak on S390 hardware acceleration Heiko Carstens
2026-02-05 22:54 ` Mikhail Zaslonko
2026-02-06 16:00 ` David Sterba
2026-01-21 4:05 ` David Sterba
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=1218d786-ad7a-4971-9cd5-273232f62d79@suse.com \
--to=wqu@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
/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