aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mprotect.c
diff options
context:
space:
mode:
authorHua Zhong <hzhong@gmail.com>2006-06-23 05:03:23 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-23 10:42:49 -0400
commitb344e05c585406904c70865e531e02467c4c7931 (patch)
tree5c9b9be9c35f5921e4796f1bafab810839765354 /mm/mprotect.c
parentcfd9b7df4abd3257c9e381b0e445817b26a51c0c (diff)
[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: Hua Zhong <hzhong@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/mprotect.c')
-rw-r--r--mm/mprotect.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/mprotect.c b/mm/mprotect.c
index 4c14d4289b6..5faf01ad3ef 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -205,8 +205,7 @@ sys_mprotect(unsigned long start, size_t len, unsigned long prot)
205 /* 205 /*
206 * Does the application expect PROT_READ to imply PROT_EXEC: 206 * Does the application expect PROT_READ to imply PROT_EXEC:
207 */ 207 */
208 if (unlikely((prot & PROT_READ) && 208 if ((prot & PROT_READ) && (current->personality & READ_IMPLIES_EXEC))
209 (current->personality & READ_IMPLIES_EXEC)))
210 prot |= PROT_EXEC; 209 prot |= PROT_EXEC;
211 210
212 vm_flags = calc_vm_prot_bits(prot); 211 vm_flags = calc_vm_prot_bits(prot);