summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipc/namespace.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/ipc/namespace.c b/ipc/namespace.c
index 4a5e752a927..a56fc598a80 100644
--- a/ipc/namespace.c
+++ b/ipc/namespace.c
@@ -50,15 +50,11 @@ struct ipc_namespace *copy_ipcs(unsigned long flags, struct ipc_namespace *ns)
{
struct ipc_namespace *new_ns;
- BUG_ON(!ns);
- get_ipc_ns(ns);
-
if (!(flags & CLONE_NEWIPC))
- return ns;
+ return get_ipc_ns(ns);
new_ns = clone_ipc_ns(ns);
- put_ipc_ns(ns);
return new_ns;
}