summaryrefslogtreecommitdiff
path: root/kernel/time
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2025-09-24 13:33:59 +0200
committerChristian Brauner <brauner@kernel.org>2025-09-25 09:23:54 +0200
commit4055526d35746ce8b04bfa5e14e14f28bb163186 (patch)
tree9d42503429528822e4cc7c2a38f2fd4bbcf10d4c /kernel/time
parent10cdfcd37ade7ce736bc4a1927680f390a6b1f7b (diff)
ns: move ns type into struct ns_common
It's misplaced in struct proc_ns_operations and ns->ops might be NULL if the namespace is compiled out but we still want to know the type of the namespace for the initial namespace struct. Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'kernel/time')
-rw-r--r--kernel/time/namespace.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/time/namespace.c b/kernel/time/namespace.c
index 9f26e61be044..530cf99c2212 100644
--- a/kernel/time/namespace.c
+++ b/kernel/time/namespace.c
@@ -462,7 +462,6 @@ out:
const struct proc_ns_operations timens_operations = {
.name = "time",
- .type = CLONE_NEWTIME,
.get = timens_get,
.put = timens_put,
.install = timens_install,
@@ -472,7 +471,6 @@ const struct proc_ns_operations timens_operations = {
const struct proc_ns_operations timens_for_children_operations = {
.name = "time_for_children",
.real_ns_name = "time",
- .type = CLONE_NEWTIME,
.get = timens_for_children_get,
.put = timens_put,
.install = timens_install,
@@ -480,6 +478,7 @@ const struct proc_ns_operations timens_for_children_operations = {
};
struct time_namespace init_time_ns = {
+ .ns.ns_type = ns_common_type(&init_time_ns),
.ns.__ns_ref = REFCOUNT_INIT(3),
.user_ns = &init_user_ns,
.ns.inum = ns_init_inum(&init_time_ns),