We should protect reading bd_info->bb_first_free with the group lock
because otherwise we might miss some free blocks. This is not a big deal
at all, but the change to do right thing is really simple, so lets do
that.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
"information for %u", group);
return ret;
}
-
bitmap = e4b.bd_bitmap;
+
+ ext4_lock_group(sb, group);
start = (e4b.bd_info->bb_first_free > start) ?
e4b.bd_info->bb_first_free : start;
- ext4_lock_group(sb, group);
while (start < max) {
start = mb_find_next_zero_bit(bitmap, max, start);