]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
btrfs: remove unnecessary wrapper get_alloc_profile
authorJohannes Thumshirn <jth@kernel.org>
Thu, 2 Jan 2020 16:14:57 +0000 (17:14 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 20 Jan 2020 15:41:01 +0000 (16:41 +0100)
btrfs_get_alloc_profile() is a simple wrapper over get_alloc_profile().
The only difference is btrfs_get_alloc_profile() is visible to other
functions in btrfs while get_alloc_profile() is static and thus only
visible to functions in block-group.c.

Let's just fold get_alloc_profile() into btrfs_get_alloc_profile() to
get rid of the unnecessary second function.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Johannes Thumshirn <jth@kernel.org>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.c

index ba71a84fd1ee277795bd0c64efe0f0bbb8c8585a..6480976ddc780fc12294b91126d435bb98f0e321 100644 (file)
@@ -96,7 +96,7 @@ static u64 btrfs_reduce_alloc_profile(struct btrfs_fs_info *fs_info, u64 flags)
        return extended_to_chunk(flags | allowed);
 }
 
-static u64 get_alloc_profile(struct btrfs_fs_info *fs_info, u64 orig_flags)
+u64 btrfs_get_alloc_profile(struct btrfs_fs_info *fs_info, u64 orig_flags)
 {
        unsigned seq;
        u64 flags;
@@ -116,11 +116,6 @@ static u64 get_alloc_profile(struct btrfs_fs_info *fs_info, u64 orig_flags)
        return btrfs_reduce_alloc_profile(fs_info, flags);
 }
 
-u64 btrfs_get_alloc_profile(struct btrfs_fs_info *fs_info, u64 orig_flags)
-{
-       return get_alloc_profile(fs_info, orig_flags);
-}
-
 void btrfs_get_block_group(struct btrfs_block_group *cache)
 {
        atomic_inc(&cache->count);