mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Acked-by: Serge Hallyn <[email protected]> Reviewed-by: WANG Cong <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
4c2a7e72d5
commit
64424289dd
1 changed files with 1 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue