From: Sun YangKai <sunk67188@gmail.com>
To: quwenruo.btrfs@gmx.com
Cc: sunk67188@gmail.com, dsterba@suse.cz, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v3] btrfs: more trivial BTRFS_PATH_AUTO_FREE conversions
Date: Mon, 01 Sep 2025 15:54:50 +0800 [thread overview]
Message-ID: <2386271.ElGaqSPkdT@saltykitkat> (raw)
In-Reply-To: <5923969.DvuYhMxLoT@saltykitkat>
> My bad.
>
> I mistakenly removed some cleanup code without converting it to use
> BTRFS_PATH_AUTO_FREE. Thanks a lot for catching this.
Given the number of code lines, it's difficult to identify exactly what was
missing, so I wrote a Python script to help verify the patch. Hopefully, we
haven't missed anything this time.
Here are the missing parts:
diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c
index c7f7c55b7c28..d1f5f6c42ef3 100644
--- a/fs/btrfs/root-tree.c
+++ b/fs/btrfs/root-tree.c
@@ -130,7 +130,7 @@ int btrfs_update_root(struct btrfs_trans_handle *trans,
struct btrfs_root
*item)
{
struct btrfs_fs_info *fs_info = root->fs_info;
- struct btrfs_path *path;
+ BTRFS_PATH_AUTO_FREE(path);
struct extent_buffer *l;
int ret;
int slot;
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index b32e2f2e5436..06d45890df85 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -1717,7 +1717,7 @@ static noinline int fixup_inode_link_count(struct
btrfs_trans_handle *trans,
struct btrfs_inode *inode)
{
struct btrfs_root *root = inode->root;
- struct btrfs_path *path;
+ BTRFS_PATH_AUTO_FREE(path);
int ret;
u64 nlink = 0;
const u64 ino = btrfs_ino(inode);
next prev parent reply other threads:[~2025-09-01 7:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-29 8:35 [PATCH v3] btrfs: more trivial BTRFS_PATH_AUTO_FREE conversions Sun YangKai
2025-08-30 1:08 ` David Sterba
2025-08-31 22:51 ` Qu Wenruo
2025-09-01 6:56 ` Sun YangKai
2025-09-01 7:54 ` Sun YangKai [this message]
2025-09-01 14:44 ` Filipe Manana
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=2386271.ElGaqSPkdT@saltykitkat \
--to=sunk67188@gmail.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.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