]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ext4: introduce EXPORT_SYMBOL_FOR_EXT4_TEST() helper
authorYe Bin <yebin10@huawei.com>
Sat, 14 Mar 2026 07:52:56 +0000 (15:52 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 28 Mar 2026 03:34:19 +0000 (23:34 -0400)
Introduce EXPORT_SYMBOL_FOR_EXT4_TEST() helper for kuint test.

Signed-off-by: Ye Bin <yebin10@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20260314075258.1317579-2-yebin@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/ext4.h

index 293f698b7042438b2757790717db22bca060797d..c579f68b3c113f563cf5344dfd10db333274cb3a 100644 (file)
@@ -3944,6 +3944,11 @@ static inline bool ext4_inode_can_atomic_write(struct inode *inode)
 extern int ext4_block_write_begin(handle_t *handle, struct folio *folio,
                                  loff_t pos, unsigned len,
                                  get_block_t *get_block);
+
+#if IS_ENABLED(CONFIG_EXT4_KUNIT_TESTS)
+#define EXPORT_SYMBOL_FOR_EXT4_TEST(sym) \
+       EXPORT_SYMBOL_FOR_MODULES(sym, "ext4-test")
+#endif
 #endif /* __KERNEL__ */
 
 #endif /* _EXT4_H */