From: Alexey Dobriyan Date: Wed, 17 Jun 2009 23:27:55 +0000 (-0700) Subject: ipcns: extract create_ipc_ns() X-Git-Tag: v2.6.31-rc1~191 X-Git-Url: http://ftp.safe.ca/?p=safe%2Fjmp%2Flinux-2.6;a=commitdiff_plain;h=612ce478fac2729ad564ec3f5d3c551674b8e9c2;hp=64424289dd2e37b4800df1f7f2ef4fe550f58729 ipcns: extract create_ipc_ns() clone_ipc_ns() is misnamed, it doesn't clone anything and doesn't use passed parameter. Rename it. create_ipc_ns() will be used by C/R to create fresh ipcns. Signed-off-by: Alexey Dobriyan Acked-by: Serge Hallyn Reviewed-by: WANG Cong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/ipc/namespace.c b/ipc/namespace.c index a56fc59..231ee53 100644 --- a/ipc/namespace.c +++ b/ipc/namespace.c @@ -14,7 +14,7 @@ #include "util.h" -static struct ipc_namespace *clone_ipc_ns(struct ipc_namespace *old_ns) +static struct ipc_namespace *create_ipc_ns(void) { struct ipc_namespace *ns; int err; @@ -48,14 +48,9 @@ static struct ipc_namespace *clone_ipc_ns(struct ipc_namespace *old_ns) struct ipc_namespace *copy_ipcs(unsigned long flags, struct ipc_namespace *ns) { - struct ipc_namespace *new_ns; - if (!(flags & CLONE_NEWIPC)) return get_ipc_ns(ns); - - new_ns = clone_ipc_ns(ns); - - return new_ns; + return create_ipc_ns(); } /*