Skip to content

Commit

Permalink
kernel/nsproxy.c: Improving a snippet of code.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Raphael S.Carvalho <[email protected]>
Signed-off-by: Eric W. Biederman <[email protected]>
  • Loading branch information
raphaelsc authored and ebiederm committed Aug 27, 2013
1 parent aee1c13 commit 21e8519
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/nsproxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 21e8519

Please sign in to comment.