]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ext4: fix mballoc-test.c is not compiled when EXT4_KUNIT_TESTS=M
authorYe Bin <yebin10@huawei.com>
Sat, 14 Mar 2026 07:52:57 +0000 (15:52 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 28 Mar 2026 03:36:02 +0000 (23:36 -0400)
commit519b76ac0b31d86b45784735d4ef964e8efdc56b
tree052bfc25643ab03442cd0b5c593d14469c9d3324
parent49504a512587147dd6da3b4b08832ccc157b97dc
ext4: fix mballoc-test.c is not compiled when EXT4_KUNIT_TESTS=M

Now, only EXT4_KUNIT_TESTS=Y testcase will be compiled in 'mballoc.c'.
To solve this issue, the ext4 test code needs to be decoupled. The ext4
test module is compiled into a separate module.

Reported-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Closes: https://patchwork.kernel.org/project/cifs-client/patch/20260118091313.1988168-2-chenxiaosong.chenxiaosong@linux.dev/
Fixes: 7c9fa399a369 ("ext4: add first unit test for ext4_mb_new_blocks_simple in mballoc")
Signed-off-by: Ye Bin <yebin10@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20260314075258.1317579-3-yebin@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/Makefile
fs/ext4/mballoc-test.c
fs/ext4/mballoc.c
fs/ext4/mballoc.h