]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
time/namespace: Export init_time_ns and do_timens_ktime_to_host()
authorMaoyi Xie <maoyixie.tju@gmail.com>
Thu, 28 May 2026 06:33:10 +0000 (14:33 +0800)
committerThomas Gleixner <tglx@kernel.org>
Tue, 2 Jun 2026 19:05:36 +0000 (21:05 +0200)
timens_ktime_to_host() in compares the current time namespace against
init_time_ns for the fast path. It calls do_timens_ktime_to_host() for the
offset case. Both symbols are needed at link time by any caller of the
inline.

All current callers are builtin, but ntsync can be built as module, which
prevents it from using it.

Export both with EXPORT_SYMBOL_GPL.

Signed-off-by: Maoyi Xie <maoyixie.tju@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260528063311.3300393-2-maoyixie.tju@gmail.com
kernel/time/namespace.c

index 4bca3f78c8ea40ffc923cfea607436123860b37a..5fa0af66cf3f79a0c2becb01a22fe233ec05b430 100644 (file)
@@ -57,6 +57,7 @@ ktime_t do_timens_ktime_to_host(clockid_t clockid, ktime_t tim,
 
        return tim;
 }
+EXPORT_SYMBOL_GPL(do_timens_ktime_to_host);
 
 static struct ucounts *inc_time_namespaces(struct user_namespace *ns)
 {
@@ -351,6 +352,7 @@ struct time_namespace init_time_ns = {
        .user_ns        = &init_user_ns,
        .frozen_offsets = true,
 };
+EXPORT_SYMBOL_GPL(init_time_ns);
 
 void __init time_ns_init(void)
 {