[Devel] [PATCH hci-8.1 v5 1/5] timens: make offset_lock private to namespace.c again

Eva Kurchatova eva.kurchatova at virtuozzo.com
Wed Oct 21 07:08:39 MSK 2026


51a228b021a0 ("ve: Add interface for ve::clock_[monotonic|bootbased]
adjustment") exported the lock for the ve code, and nothing took it
up, then or since: the only users are in namespace.c. Put it back the
way mainline has it, so that the mainline changes to this file apply
as they are.

https://virtuozzo.atlassian.net/browse/VSTOR-148112
Feature: fix ms/timens

Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
---
 include/linux/time_namespace.h | 2 --
 kernel/time/namespace.c        | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/linux/time_namespace.h b/include/linux/time_namespace.h
index 3d3b529c5a98..bb2c52f4fc94 100644
--- a/include/linux/time_namespace.h
+++ b/include/linux/time_namespace.h
@@ -32,8 +32,6 @@ struct time_namespace {
 
 extern struct time_namespace init_time_ns;
 
-extern struct mutex offset_lock;
-
 #ifdef CONFIG_TIME_NS
 extern int vdso_join_timens(struct task_struct *task,
 			    struct time_namespace *ns);
diff --git a/kernel/time/namespace.c b/kernel/time/namespace.c
index e85f947d4063..e3642278df43 100644
--- a/kernel/time/namespace.c
+++ b/kernel/time/namespace.c
@@ -214,7 +214,7 @@ struct page *find_timens_vvar_page(struct vm_area_struct *vma)
  * Protects possibly multiple offsets writers racing each other
  * and tasks entering the namespace.
  */
-DEFINE_MUTEX(offset_lock);
+static DEFINE_MUTEX(offset_lock);
 
 static void timens_set_vvar_page(struct task_struct *task,
 				struct time_namespace *ns)
-- 
2.56.0



More information about the Devel mailing list