ext4: avoid allocating blocks from corrupted group in ext4_mb_find_by_goal()
authorBaokun Li <libaokun1@huawei.com>
Thu, 4 Jan 2024 14:20:39 +0000 (22:20 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 18 Jan 2024 15:50:24 +0000 (10:50 -0500)
commit832698373a25950942c04a512daa652c18a9b513
tree27cc127c2f14d25821fe369ba90fab0f8970f718
parent4530b3660d396a646aad91a787b6ab37cf604b53
ext4: avoid allocating blocks from corrupted group in ext4_mb_find_by_goal()

Places the logic for checking if the group's block bitmap is corrupt under
the protection of the group lock to avoid allocating blocks from the group
with a corrupted block bitmap.

Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20240104142040.2835097-8-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/mballoc.c