Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 64424289 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Linus Torvalds
Browse files

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: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Acked-by: default avatarSerge Hallyn <serue@us.ibm.com>
Reviewed-by: default avatarWANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4c2a7e72
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -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;
}