From 7dd423c92e424eed57e96d535ec13ac25cceb2f8 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Wed, 10 Mar 2010 15:23:10 -0800 Subject: [PATCH] --- yaml --- r: 187259 b: refs/heads/master c: 8467005da3ef6104b89a4cc5e9c9d9445b75565f h: refs/heads/master i: 187257: fb6f37a00bcc079e9e7eef7b2ea41e10959f6a4a 187255: d6fcf108bf0d586013a3ee0f1b5d8c58367c6053 v: v3 --- [refs] | 2 +- trunk/include/linux/init_task.h | 8 -------- trunk/include/linux/ipc_namespace.h | 5 ----- trunk/include/net/net_namespace.h | 5 ----- trunk/kernel/nsproxy.c | 13 ++++++++++++- 5 files changed, 13 insertions(+), 20 deletions(-) diff --git a/[refs] b/[refs] index 03ca30973c01..90e0064a9e4e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 13aa9a6b0f2371d2ce0de57c2ede62ab7a787157 +refs/heads/master: 8467005da3ef6104b89a4cc5e9c9d9445b75565f diff --git a/trunk/include/linux/init_task.h b/trunk/include/linux/init_task.h index abec69b63d7e..b1ed1cd8e2a8 100644 --- a/trunk/include/linux/init_task.h +++ b/trunk/include/linux/init_task.h @@ -32,14 +32,6 @@ extern struct fs_struct init_fs; } extern struct nsproxy init_nsproxy; -#define INIT_NSPROXY(nsproxy) { \ - .pid_ns = &init_pid_ns, \ - .count = ATOMIC_INIT(1), \ - .uts_ns = &init_uts_ns, \ - .mnt_ns = NULL, \ - INIT_NET_NS(net_ns) \ - INIT_IPC_NS(ipc_ns) \ -} #define INIT_SIGHAND(sighand) { \ .count = ATOMIC_INIT(1), \ diff --git a/trunk/include/linux/ipc_namespace.h b/trunk/include/linux/ipc_namespace.h index 07baa38bce37..51952989ad42 100644 --- a/trunk/include/linux/ipc_namespace.h +++ b/trunk/include/linux/ipc_namespace.h @@ -62,11 +62,6 @@ extern struct ipc_namespace init_ipc_ns; extern atomic_t nr_ipc_ns; extern spinlock_t mq_lock; -#if defined(CONFIG_POSIX_MQUEUE) || defined(CONFIG_SYSVIPC) -#define INIT_IPC_NS(ns) .ns = &init_ipc_ns, -#else -#define INIT_IPC_NS(ns) -#endif #ifdef CONFIG_SYSVIPC extern int register_ipcns_notifier(struct ipc_namespace *); diff --git a/trunk/include/net/net_namespace.h b/trunk/include/net/net_namespace.h index 82b7be4db89a..bd10a7908993 100644 --- a/trunk/include/net/net_namespace.h +++ b/trunk/include/net/net_namespace.h @@ -100,14 +100,9 @@ struct net { extern struct net init_net; #ifdef CONFIG_NET -#define INIT_NET_NS(net_ns) .net_ns = &init_net, - extern struct net *copy_net_ns(unsigned long flags, struct net *net_ns); #else /* CONFIG_NET */ - -#define INIT_NET_NS(net_ns) - static inline struct net *copy_net_ns(unsigned long flags, struct net *net_ns) { /* There is nothing to copy so this is a noop */ diff --git a/trunk/kernel/nsproxy.c b/trunk/kernel/nsproxy.c index 09b4ff9711b2..2ab67233ee8f 100644 --- a/trunk/kernel/nsproxy.c +++ b/trunk/kernel/nsproxy.c @@ -24,7 +24,18 @@ static struct kmem_cache *nsproxy_cachep; -struct nsproxy init_nsproxy = INIT_NSPROXY(init_nsproxy); +struct nsproxy init_nsproxy = { + .count = ATOMIC_INIT(1), + .uts_ns = &init_uts_ns, +#if defined(CONFIG_POSIX_MQUEUE) || defined(CONFIG_SYSVIPC) + .ipc_ns = &init_ipc_ns, +#endif + .mnt_ns = NULL, + .pid_ns = &init_pid_ns, +#ifdef CONFIG_NET + .net_ns = &init_net, +#endif +}; static inline struct nsproxy *create_nsproxy(void) {