]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Apr 2026 11:25:57 +0000 (13:25 +0200)
commitbe6b97344dcce39b37bb4c7f6aad98cf246162c7
tree94b1cc8afe8b7e56f548a92c67f8b9353a6c6fdc
parentba749e9ecb18c41cd16d711569bc221c8f959931
ext4: fix mballoc-test.c is not compiled when EXT4_KUNIT_TESTS=M

[ Upstream commit 519b76ac0b31d86b45784735d4ef964e8efdc56b ]

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