summaryrefslogtreecommitdiff
path: root/fs/ext4/mballoc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/mballoc.c')
-rw-r--r--fs/ext4/mballoc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 38a11bf79329..396b01f5c4fb 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -4825,11 +4825,11 @@ ext4_trim_all_free(struct super_block *sb, ext4_group_t group,
"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);