From 86cfbad9d7b3d2f6546dd3452aaade8022ac63ec Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Fri, 11 Sep 2026 14:58:39 +0200 Subject: userns: rename insert_extent() and sort_idmaps() The KUnit test suite turned insert_extent() and sort_idmaps() into global symbols and declared them in include/linux/user_namespace.h. That header is pulled in nearly everywhere through linux/cgroup.h and the btrfs self-tests carry a static insert_extent() of their own, so any config with both test suites enabled fails to build: fs/btrfs/tests/inode-tests.c:16:13: error: conflicting types for 'insert_extent' include/linux/user_namespace.h:212:12: note: previous declaration of 'insert_extent' A global symbol needs a prefix. Rename them to uid_gid_map_insert_extent() and uid_gid_map_sort(). It's the better name anyway. No functional changes. Fixes: f6f1a2496ba5 ("userns: Add KUnit test suite for uid_gid_map") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202609110843.okbPe7GM-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202609110937.zHKPPXJk-lkp@intel.com/ Link: https://patch.msgid.link/20260911-suggerieren-suchaktion-fliehen-87b9cdf1d169@brauner Signed-off-by: Christian Brauner (Amutable) --- include/linux/user_namespace.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index 633157781edc..637cd7e91a45 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h @@ -209,8 +209,9 @@ extern bool current_in_userns(const struct user_namespace *target_ns); struct ns_common *ns_get_owner(struct ns_common *ns); #if IS_ENABLED(CONFIG_USER_NS_MAP_KUNIT_TEST) -extern int insert_extent(struct uid_gid_map *map, struct uid_gid_extent *extent); -extern int sort_idmaps(struct uid_gid_map *map); +extern int uid_gid_map_insert_extent(struct uid_gid_map *map, + struct uid_gid_extent *extent); +extern int uid_gid_map_sort(struct uid_gid_map *map); #endif /* CONFIG_USER_NS_MAP_KUNIT_TEST */ #else -- cgit v1.2.3