Commit 8467005da3ef6104b89a4cc5e9c9d9445b75565f
Committed by
Linus Torvalds
1 parent
13aa9a6b0f
Exists in
master
and in
4 other branches
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 <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>
Showing 4 changed files with 12 additions and 19 deletions Side-by-side Diff
include/linux/init_task.h
... | ... | @@ -32,14 +32,6 @@ |
32 | 32 | } |
33 | 33 | |
34 | 34 | extern struct nsproxy init_nsproxy; |
35 | -#define INIT_NSPROXY(nsproxy) { \ | |
36 | - .pid_ns = &init_pid_ns, \ | |
37 | - .count = ATOMIC_INIT(1), \ | |
38 | - .uts_ns = &init_uts_ns, \ | |
39 | - .mnt_ns = NULL, \ | |
40 | - INIT_NET_NS(net_ns) \ | |
41 | - INIT_IPC_NS(ipc_ns) \ | |
42 | -} | |
43 | 35 | |
44 | 36 | #define INIT_SIGHAND(sighand) { \ |
45 | 37 | .count = ATOMIC_INIT(1), \ |
include/linux/ipc_namespace.h
... | ... | @@ -62,11 +62,6 @@ |
62 | 62 | extern atomic_t nr_ipc_ns; |
63 | 63 | |
64 | 64 | extern spinlock_t mq_lock; |
65 | -#if defined(CONFIG_POSIX_MQUEUE) || defined(CONFIG_SYSVIPC) | |
66 | -#define INIT_IPC_NS(ns) .ns = &init_ipc_ns, | |
67 | -#else | |
68 | -#define INIT_IPC_NS(ns) | |
69 | -#endif | |
70 | 65 | |
71 | 66 | #ifdef CONFIG_SYSVIPC |
72 | 67 | extern int register_ipcns_notifier(struct ipc_namespace *); |
include/net/net_namespace.h
... | ... | @@ -100,14 +100,9 @@ |
100 | 100 | extern struct net init_net; |
101 | 101 | |
102 | 102 | #ifdef CONFIG_NET |
103 | -#define INIT_NET_NS(net_ns) .net_ns = &init_net, | |
104 | - | |
105 | 103 | extern struct net *copy_net_ns(unsigned long flags, struct net *net_ns); |
106 | 104 | |
107 | 105 | #else /* CONFIG_NET */ |
108 | - | |
109 | -#define INIT_NET_NS(net_ns) | |
110 | - | |
111 | 106 | static inline struct net *copy_net_ns(unsigned long flags, struct net *net_ns) |
112 | 107 | { |
113 | 108 | /* There is nothing to copy so this is a noop */ |
kernel/nsproxy.c
... | ... | @@ -24,7 +24,18 @@ |
24 | 24 | |
25 | 25 | static struct kmem_cache *nsproxy_cachep; |
26 | 26 | |
27 | -struct nsproxy init_nsproxy = INIT_NSPROXY(init_nsproxy); | |
27 | +struct nsproxy init_nsproxy = { | |
28 | + .count = ATOMIC_INIT(1), | |
29 | + .uts_ns = &init_uts_ns, | |
30 | +#if defined(CONFIG_POSIX_MQUEUE) || defined(CONFIG_SYSVIPC) | |
31 | + .ipc_ns = &init_ipc_ns, | |
32 | +#endif | |
33 | + .mnt_ns = NULL, | |
34 | + .pid_ns = &init_pid_ns, | |
35 | +#ifdef CONFIG_NET | |
36 | + .net_ns = &init_net, | |
37 | +#endif | |
38 | +}; | |
28 | 39 | |
29 | 40 | static inline struct nsproxy *create_nsproxy(void) |
30 | 41 | { |