diff options
author | David Sterba <dsterba@suse.com> | 2017-08-28 17:16:51 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-09-08 16:15:05 +0200 |
commit | b423d1822928bcb074e1a0e265c3a1ccbd5a2f94 (patch) | |
tree | 3e3408d37ee1896c7b5f494059cb6c956df8439d /extent-tree.c | |
parent | 6db6afd9937e37d61a14f9eeb1db5e37cefed1a6 (diff) |
btrfs-progs: switch fs_info::system_allocs to bit
The value really is 0 or 1, the test in btrfs_reserve_extent can be
simplified.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'extent-tree.c')
-rw-r--r-- | extent-tree.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/extent-tree.c b/extent-tree.c index 81a17a36..f1cc4bfe 100644 --- a/extent-tree.c +++ b/extent-tree.c @@ -2663,8 +2663,7 @@ int btrfs_reserve_extent(struct btrfs_trans_handle *trans, alloc_profile = info->avail_data_alloc_bits & info->data_alloc_profile; data = BTRFS_BLOCK_GROUP_DATA | alloc_profile; - } else if ((info->system_allocs > 0 || root == info->chunk_root) && - info->system_allocs >= 0) { + } else if (info->system_allocs == 1 || root == info->chunk_root) { alloc_profile = info->avail_system_alloc_bits & info->system_alloc_profile; data = BTRFS_BLOCK_GROUP_SYSTEM | alloc_profile; |