mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 10:01:39 -05:00
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>
This commit is contained in:
@@ -33,6 +33,7 @@ struct ipc_namespace init_ipc_ns = {
|
||||
#ifdef CONFIG_IPC_NS
|
||||
.ns.ops = &ipcns_operations,
|
||||
#endif
|
||||
.ns.ns_type = ns_common_type(&init_ipc_ns),
|
||||
};
|
||||
|
||||
struct msg_msgseg {
|
||||
|
||||
@@ -248,7 +248,6 @@ static struct user_namespace *ipcns_owner(struct ns_common *ns)
|
||||
|
||||
const struct proc_ns_operations ipcns_operations = {
|
||||
.name = "ipc",
|
||||
.type = CLONE_NEWIPC,
|
||||
.get = ipcns_get,
|
||||
.put = ipcns_put,
|
||||
.install = ipcns_install,
|
||||
|
||||
Reference in New Issue
Block a user