diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2009-06-17 16:27:54 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-18 13:03:55 -0700 |
commit | 64424289dd2e37b4800df1f7f2ef4fe550f58729 (patch) | |
tree | 15e33fc3c1e46e423b964998785ba45927e1d83b /ipc | |
parent | 4c2a7e72d5937c6a112141c7ff3df0727b3cf3df (diff) | |
download | linux-rpi-64424289dd2e37b4800df1f7f2ef4fe550f58729.tar.gz linux-rpi-64424289dd2e37b4800df1f7f2ef4fe550f58729.tar.bz2 linux-rpi-64424289dd2e37b4800df1f7f2ef4fe550f58729.zip |
ipcns: remove useless get/put while CLONE_NEWIPC
copy_ipcs() doesn't actually copy anything. If new ipcns is created, it's
created from scratch, in this case get/put on old ipcns isn't needed.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
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/namespace.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/ipc/namespace.c b/ipc/namespace.c index 4a5e752a9276..a56fc598a807 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; } |