nsproxy: remove INIT_NSPROXY()
authorAlexey Dobriyan <adobriyan@gmail.com>
Wed, 10 Mar 2010 23:23:10 +0000 (15:23 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 12 Mar 2010 23:52:40 +0000 (15:52 -0800)
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 <adobriyan@gmail.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/init_task.h
include/linux/ipc_namespace.h
include/net/net_namespace.h
kernel/nsproxy.c

index abec69b63d7e3a5d65f2bc430a0cd389138367b0..b1ed1cd8e2a891d96fa2e60cf9e10d4bd1d83b50 100644 (file)
@@ -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),                               \
index 07baa38bce3708b52921b2baccd45f095dc753df..51952989ad426dd19deef978f68ea4f7b123ec5c 100644 (file)
@@ -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 *);
index 82b7be4db89a96981a029fd9ce95074100671371..bd10a7908993fc369de73957751588d933a9bb12 100644 (file)
@@ -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 */
index 09b4ff9711b2b920ee8a042bfebab452869d9702..2ab67233ee8f71bf43fd7f746438c652c891419f 100644 (file)
 
 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)
 {