diff options
author | Christian Brauner <brauner@kernel.org> | 2025-09-24 13:33:59 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-09-25 09:23:54 +0200 |
commit | 4055526d35746ce8b04bfa5e14e14f28bb163186 (patch) | |
tree | 9d42503429528822e4cc7c2a38f2fd4bbcf10d4c /kernel/nsproxy.c | |
parent | 10cdfcd37ade7ce736bc4a1927680f390a6b1f7b (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/nsproxy.c')
-rw-r--r-- | kernel/nsproxy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c index 5f31fdff8a38..8d62449237b6 100644 --- a/kernel/nsproxy.c +++ b/kernel/nsproxy.c @@ -545,9 +545,9 @@ SYSCALL_DEFINE2(setns, int, fd, int, flags) if (proc_ns_file(fd_file(f))) { ns = get_proc_ns(file_inode(fd_file(f))); - if (flags && (ns->ops->type != flags)) + if (flags && (ns->ns_type != flags)) err = -EINVAL; - flags = ns->ops->type; + flags = ns->ns_type; } else if (!IS_ERR(pidfd_pid(fd_file(f)))) { err = check_setns_flags(flags); } else { |