diff options
author | Filipe Manana <fdmanana@suse.com> | 2025-04-08 17:13:12 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2025-05-15 14:30:45 +0200 |
commit | ae98ae2a50d72b01d0a61cb21e1ac75bfcebc5f3 (patch) | |
tree | 2f573f88f0532a2888891d6ada504afc14177a8f /fs/btrfs/defrag.c | |
parent | 2e871330cea44f7459726b0d83252949ae76166f (diff) |
btrfs: rename functions to allocate and free extent maps
These functions are exported and don't have a 'btrfs_' prefix in their
names, which goes against coding style conventions. Rename them to have
such prefix, making it clear they are from btrfs and avoiding potential
collisions in the future with functions defined elsewhere outside btrfs.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/defrag.c')
-rw-r--r-- | fs/btrfs/defrag.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/btrfs/defrag.c b/fs/btrfs/defrag.c index 8cb225ab1c17..837598c82c9f 100644 --- a/fs/btrfs/defrag.c +++ b/fs/btrfs/defrag.c @@ -621,7 +621,7 @@ static struct extent_map *defrag_get_extent(struct btrfs_inode *inode, u64 ino = btrfs_ino(inode); int ret; - em = alloc_extent_map(); + em = btrfs_alloc_extent_map(); if (!em) { ret = -ENOMEM; goto err; @@ -731,12 +731,12 @@ next: not_found: btrfs_release_path(&path); - free_extent_map(em); + btrfs_free_extent_map(em); return NULL; err: btrfs_release_path(&path); - free_extent_map(em); + btrfs_free_extent_map(em); return ERR_PTR(ret); } @@ -766,7 +766,7 @@ static struct extent_map *defrag_lookup_extent(struct inode *inode, u64 start, * file extent items in the inode's subvolume tree). */ if (em && (em->flags & EXTENT_FLAG_MERGED)) { - free_extent_map(em); + btrfs_free_extent_map(em); em = NULL; } @@ -834,7 +834,7 @@ static bool defrag_check_next_extent(struct inode *inode, struct extent_map *em, ret = true; out: - free_extent_map(next); + btrfs_free_extent_map(next); return ret; } @@ -1096,7 +1096,7 @@ add: /* Allocate new defrag_target_range */ new = kmalloc(sizeof(*new), GFP_NOFS); if (!new) { - free_extent_map(em); + btrfs_free_extent_map(em); ret = -ENOMEM; break; } @@ -1106,7 +1106,7 @@ add: next: cur = btrfs_extent_map_end(em); - free_extent_map(em); + btrfs_free_extent_map(em); } if (ret < 0) { struct defrag_target_range *entry; |