]> Gentwo Git Trees - linux/.git/commit
btrfs: apply the AUTO_K(V)FREE macros throughout the code
authorMiquel Sabaté Solà <mssola@mssola.com>
Fri, 24 Oct 2025 10:21:42 +0000 (12:21 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 24 Nov 2025 21:34:51 +0000 (22:34 +0100)
commit7ab5d01d58a766807e137cbe8c90cb2e591e2f7d
tree37355460910ff0211e6e573698e10b5cb2693df9
parentd00cbce0a7d5de5fc31bf60abd59b44d36806b6e
btrfs: apply the AUTO_K(V)FREE macros throughout the code

Apply the AUTO_KFREE and AUTO_KVFREE macros wherever it makes
sense. Since this macro is expected to improve code readability, it has
been avoided in places where the lifetime of objects wasn't easy to
follow and a cleanup attribute would've made things worse; or when the
cleanup section of a function involved many other things and thus there
was no readability impact anyways. This change has also not been applied
in extremely short functions where readability was clearly not an issue.

Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
15 files changed:
fs/btrfs/acl.c
fs/btrfs/delayed-inode.c
fs/btrfs/extent-tree.c
fs/btrfs/ioctl.c
fs/btrfs/qgroup.c
fs/btrfs/raid-stripe-tree.c
fs/btrfs/reflink.c
fs/btrfs/relocation.c
fs/btrfs/send.c
fs/btrfs/super.c
fs/btrfs/tests/extent-io-tests.c
fs/btrfs/tests/extent-map-tests.c
fs/btrfs/tree-log.c
fs/btrfs/volumes.c
fs/btrfs/zoned.c