All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs: remove unnecessary wrapper get_alloc_profile
@ 2020-01-02 16:14 Johannes Thumshirn
  2020-01-02 16:21 ` Josef Bacik
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Johannes Thumshirn @ 2020-01-02 16:14 UTC (permalink / raw)
  To: David Sterba; +Cc: linux-btrfs, Johannes Thumshirn

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.

Signed-off-by: Johannes Thumshirn <jth@kernel.org>
---
 fs/btrfs/block-group.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c
index 66fa39632cde..bdd6485c3120 100644
--- a/fs/btrfs/block-group.c
+++ b/fs/btrfs/block-group.c
@@ -95,7 +95,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;
@@ -115,11 +115,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);
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] btrfs: remove unnecessary wrapper get_alloc_profile
  2020-01-02 16:14 [PATCH] btrfs: remove unnecessary wrapper get_alloc_profile Johannes Thumshirn
@ 2020-01-02 16:21 ` Josef Bacik
  2020-01-06 10:30 ` Anand Jain
  2020-01-06 14:10 ` David Sterba
  2 siblings, 0 replies; 4+ messages in thread
From: Josef Bacik @ 2020-01-02 16:21 UTC (permalink / raw)
  To: Johannes Thumshirn, David Sterba; +Cc: linux-btrfs

On 1/2/20 11:14 AM, Johannes Thumshirn wrote:
> 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.
> 
> Signed-off-by: Johannes Thumshirn <jth@kernel.org>

Reviewed-by: Josef Bacik <josef@toxicpanda.com>

Thanks,

Josef

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] btrfs: remove unnecessary wrapper get_alloc_profile
  2020-01-02 16:14 [PATCH] btrfs: remove unnecessary wrapper get_alloc_profile Johannes Thumshirn
  2020-01-02 16:21 ` Josef Bacik
@ 2020-01-06 10:30 ` Anand Jain
  2020-01-06 14:10 ` David Sterba
  2 siblings, 0 replies; 4+ messages in thread
From: Anand Jain @ 2020-01-06 10:30 UTC (permalink / raw)
  To: Johannes Thumshirn, David Sterba; +Cc: linux-btrfs



Reviewed-by: Anand Jain <anand.jain@oracle.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] btrfs: remove unnecessary wrapper get_alloc_profile
  2020-01-02 16:14 [PATCH] btrfs: remove unnecessary wrapper get_alloc_profile Johannes Thumshirn
  2020-01-02 16:21 ` Josef Bacik
  2020-01-06 10:30 ` Anand Jain
@ 2020-01-06 14:10 ` David Sterba
  2 siblings, 0 replies; 4+ messages in thread
From: David Sterba @ 2020-01-06 14:10 UTC (permalink / raw)
  To: Johannes Thumshirn; +Cc: David Sterba, linux-btrfs

On Thu, Jan 02, 2020 at 05:14:57PM +0100, Johannes Thumshirn wrote:
> 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.
> 
> Signed-off-by: Johannes Thumshirn <jth@kernel.org>

Added to misc-next, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-01-06 14:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-02 16:14 [PATCH] btrfs: remove unnecessary wrapper get_alloc_profile Johannes Thumshirn
2020-01-02 16:21 ` Josef Bacik
2020-01-06 10:30 ` Anand Jain
2020-01-06 14:10 ` David Sterba

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.