Message ID | 49BE6A55.9040406@redhat.com |
---|---|
State | Superseded, archived |
Headers | show |
Index: linux-2.6/fs/ext4/mballoc.c =================================================================== --- linux-2.6.orig/fs/ext4/mballoc.c +++ linux-2.6/fs/ext4/mballoc.c @@ -3603,8 +3603,11 @@ static void ext4_mb_put_pa(struct ext4_a pa->pa_deleted = 1; spin_unlock(&pa->pa_lock); - /* -1 is to protect from crossing allocation group */ - ext4_get_group_no_and_offset(sb, pa->pa_pstart - 1, &grp, NULL); + /* If linear, pa_pstart is in next block group when used up */ + if (pa->pa_linear) + pa->pa_pstart--; + + ext4_get_group_no_and_offset(sb, pa->pa_pstart, &grp, NULL); /* * possible race: