mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-24 07:14:04 +00:00
btrfs: use common helper instead of open coding a bit test
The helper does the same math and we take care about the special case when flags is 0 too. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
0110a4c434
commit
818255feec
1 changed files with 1 additions and 1 deletions
|
@ -3691,7 +3691,7 @@ static int alloc_profile_is_valid(u64 flags, int extended)
|
||||||
return !extended; /* "0" is valid for usual profiles */
|
return !extended; /* "0" is valid for usual profiles */
|
||||||
|
|
||||||
/* true if exactly one bit set */
|
/* true if exactly one bit set */
|
||||||
return (flags & (flags - 1)) == 0;
|
return is_power_of_2(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int balance_need_close(struct btrfs_fs_info *fs_info)
|
static inline int balance_need_close(struct btrfs_fs_info *fs_info)
|
||||||
|
|
Loading…
Add table
Reference in a new issue