]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ext4: convert extents KUnit test to sget_fc()
authorChristian Brauner <brauner@kernel.org>
Fri, 29 May 2026 08:43:40 +0000 (10:43 +0200)
committerChristian Brauner <brauner@kernel.org>
Wed, 3 Jun 2026 07:09:50 +0000 (09:09 +0200)
commitbadb2cc8cf4aa37ecd8beda7aa5c003da93a9f74
tree44d2bd6a7d2faa6fa77cdc3fa5951d695f4f12d8
parent254f49634ee16a731174d2ae34bc50bd5f45e731
ext4: convert extents KUnit test to sget_fc()

The extents KUnit test uses sget() to get an initialized superblock for
its fake file_system_type. sget() predates fs_context and we want to
retire it. Switch this caller over to sget_fc().

Add a no-op ext_init_fs_context() so fs_context_for_mount() has
something to call on the fake fs_type. ext_set() now takes a struct
fs_context * (still a no-op). extents_kunit_init() allocates the fc,
hands it to sget_fc() and drops the fc reference once the sb is
published. sget_fc() does not retain a pointer to it.

No functional change for the test.

Link: https://patch.msgid.link/20260529-work-sget-v2-1-57bbe08604e4@kernel.org
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
fs/ext4/extents-test.c