Skip to content

Commit

Permalink
[PATCH] likely cleanup: remove unlikely in sys_mprotect()
Browse files Browse the repository at this point in the history
With likely/unlikely profiling on my not-so-busy-typical-developmentsystem
there are 5k misses vs 2k hits.  So I guess we should remove the unlikely.

Signed-off-by: Hua Zhong <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
hzhongmj authored and Linus Torvalds committed Jun 23, 2006
1 parent cfd9b7d commit b344e05
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mm/mprotect.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,7 @@ sys_mprotect(unsigned long start, size_t len, unsigned long prot)
/*
* Does the application expect PROT_READ to imply PROT_EXEC:
*/
if (unlikely((prot & PROT_READ) &&
(current->personality & READ_IMPLIES_EXEC)))
if ((prot & PROT_READ) && (current->personality & READ_IMPLIES_EXEC))
prot |= PROT_EXEC;

vm_flags = calc_vm_prot_bits(prot);
Expand Down

0 comments on commit b344e05

Please sign in to comment.