Commit b344e05c authored by Hua Zhong's avatar Hua Zhong Committed by Linus Torvalds

[PATCH] likely cleanup: remove unlikely in sys_mprotect()

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: default avatarHua Zhong <hzhong@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent cfd9b7df
...@@ -205,8 +205,7 @@ sys_mprotect(unsigned long start, size_t len, unsigned long prot) ...@@ -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: * Does the application expect PROT_READ to imply PROT_EXEC:
*/ */
if (unlikely((prot & PROT_READ) && if ((prot & PROT_READ) && (current->personality & READ_IMPLIES_EXEC))
(current->personality & READ_IMPLIES_EXEC)))
prot |= PROT_EXEC; prot |= PROT_EXEC;
vm_flags = calc_vm_prot_bits(prot); vm_flags = calc_vm_prot_bits(prot);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment