diff options
author | Cedric Le Goater <clg@fr.ibm.com> | 2007-07-16 02:40:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 12:05:47 -0400 |
commit | 7d69a1f4a72b18876c99c697692b78339d491568 (patch) | |
tree | c09faf07f15240592919ec7e3dd722fe4f1dd370 /ipc | |
parent | 522ed7767e800cff6c650ec64b0ee0677303119c (diff) |
remove CONFIG_UTS_NS and CONFIG_IPC_NS
CONFIG_UTS_NS and CONFIG_IPC_NS have very little value as they only
deactivate the unshare of the uts and ipc namespaces and do not improve
performance.
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Acked-by: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Pavel Emelianov <xemul@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/msg.c | 4 | ||||
-rw-r--r-- | ipc/sem.c | 4 | ||||
-rw-r--r-- | ipc/shm.c | 4 | ||||
-rw-r--r-- | ipc/util.c | 11 | ||||
-rw-r--r-- | ipc/util.h | 8 |
5 files changed, 6 insertions, 25 deletions
@@ -87,7 +87,7 @@ static int newque (struct ipc_namespace *ns, key_t key, int msgflg); | |||
87 | static int sysvipc_msg_proc_show(struct seq_file *s, void *it); | 87 | static int sysvipc_msg_proc_show(struct seq_file *s, void *it); |
88 | #endif | 88 | #endif |
89 | 89 | ||
90 | static void __ipc_init __msg_init_ns(struct ipc_namespace *ns, struct ipc_ids *ids) | 90 | static void __msg_init_ns(struct ipc_namespace *ns, struct ipc_ids *ids) |
91 | { | 91 | { |
92 | ns->ids[IPC_MSG_IDS] = ids; | 92 | ns->ids[IPC_MSG_IDS] = ids; |
93 | ns->msg_ctlmax = MSGMAX; | 93 | ns->msg_ctlmax = MSGMAX; |
@@ -96,7 +96,6 @@ static void __ipc_init __msg_init_ns(struct ipc_namespace *ns, struct ipc_ids *i | |||
96 | ipc_init_ids(ids, ns->msg_ctlmni); | 96 | ipc_init_ids(ids, ns->msg_ctlmni); |
97 | } | 97 | } |
98 | 98 | ||
99 | #ifdef CONFIG_IPC_NS | ||
100 | int msg_init_ns(struct ipc_namespace *ns) | 99 | int msg_init_ns(struct ipc_namespace *ns) |
101 | { | 100 | { |
102 | struct ipc_ids *ids; | 101 | struct ipc_ids *ids; |
@@ -128,7 +127,6 @@ void msg_exit_ns(struct ipc_namespace *ns) | |||
128 | kfree(ns->ids[IPC_MSG_IDS]); | 127 | kfree(ns->ids[IPC_MSG_IDS]); |
129 | ns->ids[IPC_MSG_IDS] = NULL; | 128 | ns->ids[IPC_MSG_IDS] = NULL; |
130 | } | 129 | } |
131 | #endif | ||
132 | 130 | ||
133 | void __init msg_init(void) | 131 | void __init msg_init(void) |
134 | { | 132 | { |
@@ -121,7 +121,7 @@ static int sysvipc_sem_proc_show(struct seq_file *s, void *it); | |||
121 | #define sc_semopm sem_ctls[2] | 121 | #define sc_semopm sem_ctls[2] |
122 | #define sc_semmni sem_ctls[3] | 122 | #define sc_semmni sem_ctls[3] |
123 | 123 | ||
124 | static void __ipc_init __sem_init_ns(struct ipc_namespace *ns, struct ipc_ids *ids) | 124 | static void __sem_init_ns(struct ipc_namespace *ns, struct ipc_ids *ids) |
125 | { | 125 | { |
126 | ns->ids[IPC_SEM_IDS] = ids; | 126 | ns->ids[IPC_SEM_IDS] = ids; |
127 | ns->sc_semmsl = SEMMSL; | 127 | ns->sc_semmsl = SEMMSL; |
@@ -132,7 +132,6 @@ static void __ipc_init __sem_init_ns(struct ipc_namespace *ns, struct ipc_ids *i | |||
132 | ipc_init_ids(ids, ns->sc_semmni); | 132 | ipc_init_ids(ids, ns->sc_semmni); |
133 | } | 133 | } |
134 | 134 | ||
135 | #ifdef CONFIG_IPC_NS | ||
136 | int sem_init_ns(struct ipc_namespace *ns) | 135 | int sem_init_ns(struct ipc_namespace *ns) |
137 | { | 136 | { |
138 | struct ipc_ids *ids; | 137 | struct ipc_ids *ids; |
@@ -164,7 +163,6 @@ void sem_exit_ns(struct ipc_namespace *ns) | |||
164 | kfree(ns->ids[IPC_SEM_IDS]); | 163 | kfree(ns->ids[IPC_SEM_IDS]); |
165 | ns->ids[IPC_SEM_IDS] = NULL; | 164 | ns->ids[IPC_SEM_IDS] = NULL; |
166 | } | 165 | } |
167 | #endif | ||
168 | 166 | ||
169 | void __init sem_init (void) | 167 | void __init sem_init (void) |
170 | { | 168 | { |
@@ -77,7 +77,7 @@ static void shm_destroy (struct ipc_namespace *ns, struct shmid_kernel *shp); | |||
77 | static int sysvipc_shm_proc_show(struct seq_file *s, void *it); | 77 | static int sysvipc_shm_proc_show(struct seq_file *s, void *it); |
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | static void __ipc_init __shm_init_ns(struct ipc_namespace *ns, struct ipc_ids *ids) | 80 | static void __shm_init_ns(struct ipc_namespace *ns, struct ipc_ids *ids) |
81 | { | 81 | { |
82 | ns->ids[IPC_SHM_IDS] = ids; | 82 | ns->ids[IPC_SHM_IDS] = ids; |
83 | ns->shm_ctlmax = SHMMAX; | 83 | ns->shm_ctlmax = SHMMAX; |
@@ -98,7 +98,6 @@ static void do_shm_rmid(struct ipc_namespace *ns, struct shmid_kernel *shp) | |||
98 | shm_destroy(ns, shp); | 98 | shm_destroy(ns, shp); |
99 | } | 99 | } |
100 | 100 | ||
101 | #ifdef CONFIG_IPC_NS | ||
102 | int shm_init_ns(struct ipc_namespace *ns) | 101 | int shm_init_ns(struct ipc_namespace *ns) |
103 | { | 102 | { |
104 | struct ipc_ids *ids; | 103 | struct ipc_ids *ids; |
@@ -130,7 +129,6 @@ void shm_exit_ns(struct ipc_namespace *ns) | |||
130 | kfree(ns->ids[IPC_SHM_IDS]); | 129 | kfree(ns->ids[IPC_SHM_IDS]); |
131 | ns->ids[IPC_SHM_IDS] = NULL; | 130 | ns->ids[IPC_SHM_IDS] = NULL; |
132 | } | 131 | } |
133 | #endif | ||
134 | 132 | ||
135 | void __init shm_init (void) | 133 | void __init shm_init (void) |
136 | { | 134 | { |
diff --git a/ipc/util.c b/ipc/util.c index 7536a7292d48..44e5135aee47 100644 --- a/ipc/util.c +++ b/ipc/util.c | |||
@@ -50,7 +50,6 @@ struct ipc_namespace init_ipc_ns = { | |||
50 | }, | 50 | }, |
51 | }; | 51 | }; |
52 | 52 | ||
53 | #ifdef CONFIG_IPC_NS | ||
54 | static struct ipc_namespace *clone_ipc_ns(struct ipc_namespace *old_ns) | 53 | static struct ipc_namespace *clone_ipc_ns(struct ipc_namespace *old_ns) |
55 | { | 54 | { |
56 | int err; | 55 | int err; |
@@ -110,14 +109,6 @@ void free_ipc_ns(struct kref *kref) | |||
110 | shm_exit_ns(ns); | 109 | shm_exit_ns(ns); |
111 | kfree(ns); | 110 | kfree(ns); |
112 | } | 111 | } |
113 | #else | ||
114 | struct ipc_namespace *copy_ipcs(unsigned long flags, struct ipc_namespace *ns) | ||
115 | { | ||
116 | if (flags & CLONE_NEWIPC) | ||
117 | return ERR_PTR(-EINVAL); | ||
118 | return ns; | ||
119 | } | ||
120 | #endif | ||
121 | 112 | ||
122 | /** | 113 | /** |
123 | * ipc_init - initialise IPC subsystem | 114 | * ipc_init - initialise IPC subsystem |
@@ -145,7 +136,7 @@ __initcall(ipc_init); | |||
145 | * array itself. | 136 | * array itself. |
146 | */ | 137 | */ |
147 | 138 | ||
148 | void __ipc_init ipc_init_ids(struct ipc_ids* ids, int size) | 139 | void ipc_init_ids(struct ipc_ids* ids, int size) |
149 | { | 140 | { |
150 | int i; | 141 | int i; |
151 | 142 | ||
diff --git a/ipc/util.h b/ipc/util.h index e3aa2c5c97dc..333e891bcaca 100644 --- a/ipc/util.h +++ b/ipc/util.h | |||
@@ -41,12 +41,8 @@ struct ipc_ids { | |||
41 | }; | 41 | }; |
42 | 42 | ||
43 | struct seq_file; | 43 | struct seq_file; |
44 | #ifdef CONFIG_IPC_NS | 44 | |
45 | #define __ipc_init | 45 | void ipc_init_ids(struct ipc_ids *ids, int size); |
46 | #else | ||
47 | #define __ipc_init __init | ||
48 | #endif | ||
49 | void __ipc_init ipc_init_ids(struct ipc_ids *ids, int size); | ||
50 | #ifdef CONFIG_PROC_FS | 46 | #ifdef CONFIG_PROC_FS |
51 | void __init ipc_init_proc_interface(const char *path, const char *header, | 47 | void __init ipc_init_proc_interface(const char *path, const char *header, |
52 | int ids, int (*show)(struct seq_file *, void *)); | 48 | int ids, int (*show)(struct seq_file *, void *)); |