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/backref.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/backref.c')
| -rw-r--r-- | fs/btrfs/backref.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index e050d0938dc4..eff2d388a706 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -2785,7 +2785,7 @@ struct btrfs_data_container *init_data_container(u32 total_bytes) * allocates space to return multiple file system paths for an inode. * total_bytes to allocate are passed, note that space usable for actual path * information will be total_bytes - sizeof(struct inode_fs_paths). - * the returned pointer must be freed with free_ipath() in the end. + * the returned pointer must be freed with __free_inode_fs_paths() in the end. */ struct inode_fs_paths *init_ipath(s32 total_bytes, struct btrfs_root *fs_root, struct btrfs_path *path) @@ -2810,14 +2810,6 @@ struct inode_fs_paths *init_ipath(s32 total_bytes, struct btrfs_root *fs_root, return ifp; } -void free_ipath(struct inode_fs_paths *ipath) -{ - if (!ipath) - return; - kvfree(ipath->fspath); - kfree(ipath); -} - struct btrfs_backref_iter *btrfs_backref_iter_alloc(struct btrfs_fs_info *fs_info) { struct btrfs_backref_iter *ret; |