aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorCedric Le Goater <clg@fr.ibm.com>2007-07-16 02:40:58 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-16 12:05:47 -0400
commit7d69a1f4a72b18876c99c697692b78339d491568 (patch)
treec09faf07f15240592919ec7e3dd722fe4f1dd370 /ipc
parent522ed7767e800cff6c650ec64b0ee0677303119c (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.c4
-rw-r--r--ipc/sem.c4
-rw-r--r--ipc/shm.c4
-rw-r--r--ipc/util.c11
-rw-r--r--ipc/util.h8
5 files changed, 6 insertions, 25 deletions
diff --git a/ipc/msg.c b/ipc/msg.c
index a388824740e7..cbd27e519943 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -87,7 +87,7 @@ static int newque (struct ipc_namespace *ns, key_t key, int msgflg);
87static int sysvipc_msg_proc_show(struct seq_file *s, void *it); 87static int sysvipc_msg_proc_show(struct seq_file *s, void *it);
88#endif 88#endif
89 89
90static void __ipc_init __msg_init_ns(struct ipc_namespace *ns, struct ipc_ids *ids) 90static 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
100int msg_init_ns(struct ipc_namespace *ns) 99int 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
133void __init msg_init(void) 131void __init msg_init(void)
134{ 132{
diff --git a/ipc/sem.c b/ipc/sem.c
index 9964b2224c70..89bfdffb38d8 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -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
124static void __ipc_init __sem_init_ns(struct ipc_namespace *ns, struct ipc_ids *ids) 124static 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
136int sem_init_ns(struct ipc_namespace *ns) 135int 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
169void __init sem_init (void) 167void __init sem_init (void)
170{ 168{
diff --git a/ipc/shm.c b/ipc/shm.c
index 0852f206d895..242c3f66493a 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -77,7 +77,7 @@ static void shm_destroy (struct ipc_namespace *ns, struct shmid_kernel *shp);
77static int sysvipc_shm_proc_show(struct seq_file *s, void *it); 77static int sysvipc_shm_proc_show(struct seq_file *s, void *it);
78#endif 78#endif
79 79
80static void __ipc_init __shm_init_ns(struct ipc_namespace *ns, struct ipc_ids *ids) 80static 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
102int shm_init_ns(struct ipc_namespace *ns) 101int 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
135void __init shm_init (void) 133void __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
54static struct ipc_namespace *clone_ipc_ns(struct ipc_namespace *old_ns) 53static 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
114struct 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
148void __ipc_init ipc_init_ids(struct ipc_ids* ids, int size) 139void 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
43struct seq_file; 43struct seq_file;
44#ifdef CONFIG_IPC_NS 44
45#define __ipc_init 45void ipc_init_ids(struct ipc_ids *ids, int size);
46#else
47#define __ipc_init __init
48#endif
49void __ipc_init ipc_init_ids(struct ipc_ids *ids, int size);
50#ifdef CONFIG_PROC_FS 46#ifdef CONFIG_PROC_FS
51void __init ipc_init_proc_interface(const char *path, const char *header, 47void __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 *));