scoutfs: fix buddy stable bit test

The buddy allocator had the test for non-existant stable bitmap blocks
backwards.  An uninitialized block implies that all the bits are marked
free and we don't need to test that the specific bits are free.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2016-09-08 16:52:45 -07:00
parent 1dd4a14d04
commit 3bb0c80686

View File

@@ -388,7 +388,7 @@ static int find_first_fit(struct scoutfs_super_block *super, int sl,
made_progress = true;
/* advance to next bit if it's not free in stable */
if (!st_bud ||
if (st_bud &&
!test_buddy_bit_or_higher(st_bud, i, nr)) {
nrs[i] = nr + 1;
continue;