From: "Miquel Sabaté Solà" <mssola@mssola.com>
To: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
"clm@fb.com" <clm@fb.com>, "dsterba@suse.com" <dsterba@suse.com>,
Naohiro Aota <Naohiro.Aota@wdc.com>,
"boris@bur.io" <boris@bur.io>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] btrfs: fix memory leaks when rejecting a non SINGLE data profile without an RST
Date: Wed, 08 Oct 2025 14:15:45 +0200 [thread overview]
Message-ID: <878qhld1xq.fsf@> (raw)
In-Reply-To: <2e943abf-2adc-4726-85db-c2ee5dd97017@wdc.com> (Johannes Thumshirn's message of "Wed, 8 Oct 2025 12:04:12 +0000")
[-- Attachment #1: Type: text/plain, Size: 1302 bytes --]
Johannes Thumshirn @ 2025-10-08 12:04 GMT:
> On 10/8/25 9:41 AM, Miquel Sabaté Solà wrote:
>> diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
>> index e3341a84f4ab..8f767a6cd49b 100644
>> --- a/fs/btrfs/zoned.c
>> +++ b/fs/btrfs/zoned.c
>> @@ -1753,7 +1753,11 @@ int btrfs_load_block_group_zone_info(struct btrfs_block_group *cache, bool new)
>> !fs_info->stripe_root) {
>> btrfs_err(fs_info, "zoned: data %s needs raid-stripe-tree",
>> btrfs_bg_type_to_raid_name(map->type));
>> - return -EINVAL;
>> + /*
>> + * Note that this might be overwritten by later if statements,
>> + * but the error will be at least printed by the line above.
>> + */
>
>
> Not convinced the comment is useful.
>
>> + ret = -EINVAL;
>> }
>>
>> if (unlikely(cache->alloc_offset > cache->zone_capacity)) {
>> @@ -1785,6 +1789,7 @@ int btrfs_load_block_group_zone_info(struct btrfs_block_group *cache, bool new)
>> btrfs_free_chunk_map(cache->physical_map);
>> cache->physical_map = NULL;
>> }
>> +
>> bitmap_free(active);
>> kfree(zone_info);
>>
>
>
> Stray newline.
>
> Other than that,
>
> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Thanks for the review! Let me send a v3 shortly with your comments
applied.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 897 bytes --]
prev parent reply other threads:[~2025-10-08 12:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-08 7:40 [PATCH v2] btrfs: fix memory leaks when rejecting a non SINGLE data profile without an RST Miquel Sabaté Solà
2025-10-08 12:04 ` Johannes Thumshirn
2025-10-08 12:15 ` Miquel Sabaté Solà [this message]
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=878qhld1xq.fsf@ \
--to=mssola@mssola.com \
--cc=Johannes.Thumshirn@wdc.com \
--cc=Naohiro.Aota@wdc.com \
--cc=boris@bur.io \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.