kernel-ark/ipc
Pavel Emelyanov ae5e1b22f1 namespaces: move the IPC namespace under IPC_NS option
Currently the IPC namespace management code is spread over the ipc/*.c files.
I moved this code into ipc/namespace.c file which is compiled out when needed.

The linux/ipc_namespace.h file is used to store the prototypes of the
functions in namespace.c and the stubs for NAMESPACES=n case.  This is done
so, because the stub for copy_ipc_namespace requires the knowledge of the
CLONE_NEWIPC flag, which is in sched.h.  But the linux/ipc.h file itself in
included into many many .c files via the sys.h->sem.h sequence so adding the
sched.h into it will make all these .c depend on sched.h which is not that
good.  On the other hand the knowledge about the namespaces stuff is required
in 4 .c files only.

Besides, this patch compiles out some auxiliary functions from ipc/sem.c,
msg.c and shm.c files.  It turned out that moving these functions into
namespaces.c is not that easy because they use many other calls and macros
from the original file.  Moving them would make this patch complicated.  On
the other hand all these functions can be consolidated, so I will send a
separate patch doing this a bit later.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Kirill Korotaev <dev@sw.ru>
Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 09:22:23 -08:00
..
compat_mq.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
compat.c fix logic error in ipc compat semctl() 2007-07-06 10:23:43 -07:00
ipc_sysctl.c namespaces: move the IPC namespace under IPC_NS option 2008-02-08 09:22:23 -08:00
Makefile namespaces: move the IPC namespace under IPC_NS option 2008-02-08 09:22:23 -08:00
mqueue.c ipc: lost unlock and fput in mqueue.c on error path 2007-11-29 09:24:52 -08:00
msg.c namespaces: move the IPC namespace under IPC_NS option 2008-02-08 09:22:23 -08:00
msgutil.c [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
namespace.c namespaces: move the IPC namespace under IPC_NS option 2008-02-08 09:22:23 -08:00
sem.c namespaces: move the IPC namespace under IPC_NS option 2008-02-08 09:22:23 -08:00
shm.c namespaces: move the IPC namespace under IPC_NS option 2008-02-08 09:22:23 -08:00
util.c namespaces: move the IPC namespace under IPC_NS option 2008-02-08 09:22:23 -08:00
util.h namespaces: move the IPC namespace under IPC_NS option 2008-02-08 09:22:23 -08:00