From: Hua Zhong Date: Fri, 23 Jun 2006 09:03:23 +0000 (-0700) Subject: [PATCH] likely cleanup: remove unlikely in sys_mprotect() X-Git-Tag: v2.6.18-rc1~1081^2~189 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b344e05c585406904c70865e531e02467c4c7931;p=linux-2.6 [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/mprotect.c b/mm/mprotect.c index 4c14d4289b..5faf01ad3e 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c @@ -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);