diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2025-10-24 12:21:40 +0200 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-11-24 22:34:51 +0100 |
| commit | 285c3ab28eed282af70aba02d7708dea245bfc4b (patch) | |
| tree | ed4cc849ed9fdb43582608501512ef868dbf7252 /fs/btrfs/inode.c | |
| parent | 937f99c736135e530895eff028503cb057eb75f6 (diff) | |
btrfs: declare free_ipath() via DEFINE_FREE()
The free_ipath() function was being used as a cleanup function
everywhere. Declare it via DEFINE_FREE() so we can use this function
with the __free() helper.
The name has also been adjusted so it's closer to the type's name.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
| -rw-r--r-- | fs/btrfs/inode.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 41b1d7819b86..7958e6c4f6b3 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -130,7 +130,7 @@ static int data_reloc_print_warning_inode(u64 inum, u64 offset, u64 num_bytes, struct btrfs_fs_info *fs_info = warn->fs_info; struct extent_buffer *eb; struct btrfs_inode_item *inode_item; - struct inode_fs_paths *ipath = NULL; + struct inode_fs_paths *ipath __free(inode_fs_paths) = NULL; struct btrfs_root *local_root; struct btrfs_key key; unsigned int nofs_flag; @@ -195,7 +195,6 @@ static int data_reloc_print_warning_inode(u64 inum, u64 offset, u64 num_bytes, } btrfs_put_root(local_root); - free_ipath(ipath); return 0; err: @@ -203,7 +202,6 @@ err: "checksum error at logical %llu mirror %u root %llu inode %llu offset %llu, path resolving failed with ret=%d", warn->logical, warn->mirror_num, root, inum, offset, ret); - free_ipath(ipath); return ret; } |