]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Mar 2024 12:34:50 +0000 (13:34 +0100)
commitd3bbe77a76bc52e9d4d0a120f1509be36e25c916
tree1e3e72b6a87a2dbbd043b1eb1dfc3262d0439dc2
parent0184747b552d6b5a14db3b7fcc3b792ce64dedd1
ext4: avoid allocating blocks from corrupted group in ext4_mb_find_by_goal()

[ Upstream commit 832698373a25950942c04a512daa652c18a9b513 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ext4/mballoc.c