public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Mikhail Zaslonko <zaslonko@linux.ibm.com>
To: Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Cc: linux-s390@vger.kernel.org, Heiko Carstens <hca@linux.ibm.com>
Subject: Re: [PATCH] btrfs: fix the folio leak on S390 hardware acceleration
Date: Thu, 5 Feb 2026 23:54:21 +0100	[thread overview]
Message-ID: <4055f852-0488-4ccf-abb5-bc5f8d2c9635@linux.ibm.com> (raw)
In-Reply-To: <1218d786-ad7a-4971-9cd5-273232f62d79@suse.com>

Hello Qu,

Sorry for the late response. 
I ran some test on s390 including folio-leak verification. LGTM.

Tested-by:   Mikhail Zaslonko <zaslonko@linux.ibm.com>


On 20-Jan-26 23:52, Qu Wenruo wrote:
> 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;
> 
> 


  parent reply	other threads:[~2026-02-05 22:54 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 ` [PATCH] btrfs: fix the folio leak on S390 hardware acceleration Qu Wenruo
2026-01-21  9:28   ` Heiko Carstens
2026-02-05 22:54   ` Mikhail Zaslonko [this message]
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=4055f852-0488-4ccf-abb5-bc5f8d2c9635@linux.ibm.com \
    --to=zaslonko@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=wqu@suse.com \
    /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