ext4: hold group lock in ext4 kunit test
authorKemeng Shi <shikemeng@huaweicloud.com>
Mon, 4 Mar 2024 16:35:42 +0000 (00:35 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 7 Mar 2024 18:32:54 +0000 (13:32 -0500)
commitad943758e0ebd881d031b657a3f389315bf3a101
treefeedcf114c03e38b52c17418a5812a61f3fc0d5c
parent8ffc0cd24c2a3ea340743db18b1a1e999176fbd3
ext4: hold group lock in ext4 kunit test

Although there is no concurrent block allocation/free in unit test,
internal functions mb_mark_used and mb_free_blocks assert group
lock is always held. Acquire group before calling mb_mark_used and
mb_free_blocks in unit test to avoid the assertion.

Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20240304163543.6700-3-shikemeng@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/mballoc-test.c