diff options
| author | Christian Brauner <brauner@kernel.org> | 2025-09-25 09:22:09 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-09-25 09:23:55 +0200 |
| commit | 6e65f4e8fc5b02f7a60ebb5b1b83772df0b86663 (patch) | |
| tree | b76db4a01798af39da02bf1581beaca1a9302f97 /kernel/time | |
| parent | d969328c513c6679b4be11a995ffd4d184c25b34 (diff) | |
| parent | af075603f27b0f6e05f1bdf64bad42fa7cfb033b (diff) | |
Merge patch series "ns: tweak ns common handling"
Christian Brauner <brauner@kernel.org> says:
This contains three minor tweaks for namespace handling:
* Make struct ns_tree private. There's no need for anything to access
that directly.
* Drop a debug assert that would trigger in conditions that are benign.
* Move the type of the namespace out of struct proc_ns_operations and
into struct ns_common. This eliminates a pointer dereference and also
allows assertions to work when the namespace type is disabled and the
operations field set to NULL.
* patches from https://lore.kernel.org/20250924-work-namespaces-fixes-v1-0-8fb682c8678e@kernel.org:
ns: drop assert
ns: move ns type into struct ns_common
nstree: make struct ns_tree private
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'kernel/time')
| -rw-r--r-- | kernel/time/namespace.c | 3 |
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), |
