Skip to content

Commit e18d8ce

Browse files
fdmananakdave
authored andcommitted
btrfs: remove no longer used btrfs_clone_chunk_map()
There are no more users of btrfs_clone_chunk_map(), the last one (and only one ever) was removed in commit 1ec17ef ("btrfs: zoned: fix use-after-free in do_zone_finish()"). So remove btrfs_clone_chunk_map(). Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent acf9857 commit e18d8ce

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

fs/btrfs/volumes.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5614,21 +5614,6 @@ struct btrfs_chunk_map *btrfs_alloc_chunk_map(int num_stripes, gfp_t gfp)
56145614
return map;
56155615
}
56165616

5617-
struct btrfs_chunk_map *btrfs_clone_chunk_map(struct btrfs_chunk_map *map, gfp_t gfp)
5618-
{
5619-
const int size = btrfs_chunk_map_size(map->num_stripes);
5620-
struct btrfs_chunk_map *clone;
5621-
5622-
clone = kmemdup(map, size, gfp);
5623-
if (!clone)
5624-
return NULL;
5625-
5626-
refcount_set(&clone->refs, 1);
5627-
RB_CLEAR_NODE(&clone->rb_node);
5628-
5629-
return clone;
5630-
}
5631-
56325617
static struct btrfs_block_group *create_chunk(struct btrfs_trans_handle *trans,
56335618
struct alloc_chunk_ctl *ctl,
56345619
struct btrfs_device_info *devices_info)

fs/btrfs/volumes.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,6 @@ struct btrfs_chunk_map *btrfs_alloc_chunk_map(int num_stripes, gfp_t gfp);
743743
int btrfs_add_chunk_map(struct btrfs_fs_info *fs_info, struct btrfs_chunk_map *map);
744744
#endif
745745

746-
struct btrfs_chunk_map *btrfs_clone_chunk_map(struct btrfs_chunk_map *map, gfp_t gfp);
747746
struct btrfs_chunk_map *btrfs_find_chunk_map(struct btrfs_fs_info *fs_info,
748747
u64 logical, u64 length);
749748
struct btrfs_chunk_map *btrfs_find_chunk_map_nolock(struct btrfs_fs_info *fs_info,

0 commit comments

Comments
 (0)