You need to sign in or sign up before continuing.
提交 64424289 编写于 作者: A Alexey Dobriyan 提交者: Linus Torvalds

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: NAlexey Dobriyan <adobriyan@gmail.com>
Acked-by: NSerge Hallyn <serue@us.ibm.com>
Reviewed-by: NWANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 4c2a7e72
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册