From: Alexey Dobriyan Date: Wed, 10 Mar 2010 23:23:10 +0000 (-0800) Subject: nsproxy: remove INIT_NSPROXY() X-Git-Tag: v2.6.34-rc2~128 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8467005da3ef6104b89a4cc5e9c9d9445b75565f;p=platform%2Fupstream%2Fkernel-adaptation-pc.git nsproxy: remove INIT_NSPROXY() Remove INIT_NSPROXY(), use C99 initializer. Remove INIT_IPC_NS(), INIT_NET_NS() while I'm at it. Note: headers trim will be done later, now it's quite pointless because results will be invalidated by merge window. Signed-off-by: Alexey Dobriyan Acked-by: Serge Hallyn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/init_task.h b/include/linux/init_task.h index abec69b..b1ed1cd 100644 --- a/include/linux/init_task.h +++ b/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/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index 07baa38..5195298 100644 --- a/include/linux/ipc_namespace.h +++ b/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/include/net/net_namespace.h b/include/net/net_namespace.h index 82b7be4..bd10a79 100644 --- a/include/net/net_namespace.h +++ b/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/kernel/nsproxy.c b/kernel/nsproxy.c index 09b4ff9..2ab6723 100644 --- a/kernel/nsproxy.c +++ b/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) {