Skip to content

Commit 21e8519

Browse files
raphaelscebiederm
authored andcommitted
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 <serge.hallyn@ubuntu.com> Signed-off-by: Raphael S.Carvalho <raphael.scarv@gmail.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
1 parent aee1c13 commit 21e8519

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎kernel/nsproxy.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ int copy_namespaces(unsigned long flags, struct task_struct *tsk)
148148
* means share undolist with parent, so we must forbid using
149149
* it along with CLONE_NEWIPC.
150150
*/
151-
if ((flags & CLONE_NEWIPC) && (flags & CLONE_SYSVSEM)) {
151+
if ((flags & (CLONE_NEWIPC | CLONE_SYSVSEM)) ==
152+
(CLONE_NEWIPC | CLONE_SYSVSEM)) {
152153
err = -EINVAL;
153154
goto out;
154155
}

0 commit comments

Comments
 (0)