]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
kernel/nsproxy.c: Improving a snippet of code.
authorRaphael S.Carvalho <raphael.scarv@gmail.com>
Wed, 27 Feb 2013 18:32:09 +0000 (15:32 -0300)
committerEric W. Biederman <ebiederm@xmission.com>
Tue, 27 Aug 2013 00:45:56 +0000 (17:45 -0700)
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 <serge.hallyn@ubuntu.com>
Signed-off-by: Raphael S.Carvalho <raphael.scarv@gmail.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
kernel/nsproxy.c

index 364ceab15f0cc09816fdd1b36b78814b06227991..d9afd256318fd5fd2808f14f123b2fbb11141bf8 100644 (file)
@@ -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;
        }