From 0d06f1bd01264cafb0e6975e53ecaa7b7c78dd22 Mon Sep 17 00:00:00 2001 From: "Raphael S.Carvalho" Date: Wed, 27 Feb 2013 15:32:09 -0300 Subject: [PATCH] kernel/nsproxy.c: Improving a snippet of code. It seems GCC generates a better code in that way, so I changed that statement. Btw, they have the same semantic, so I'm sending this patch due to performance issues. Acked-by: Serge E. Hallyn Signed-off-by: Raphael S.Carvalho Signed-off-by: Eric W. Biederman --- kernel/nsproxy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c index 364ceab15f0cc..d9afd256318fd 100644 --- a/kernel/nsproxy.c +++ b/kernel/nsproxy.c @@ -148,7 +148,8 @@ int copy_namespaces(unsigned long flags, struct task_struct *tsk) * means share undolist with parent, so we must forbid using * it along with CLONE_NEWIPC. */ - if ((flags & CLONE_NEWIPC) && (flags & CLONE_SYSVSEM)) { + if ((flags & (CLONE_NEWIPC | CLONE_SYSVSEM)) == + (CLONE_NEWIPC | CLONE_SYSVSEM)) { err = -EINVAL; goto out; } -- 2.39.5