]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] likely cleanup: remove unlikely in sys_mprotect()
authorHua Zhong <hzhong@gmail.com>
Fri, 23 Jun 2006 09:03:23 +0000 (02:03 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 23 Jun 2006 14:42:49 +0000 (07:42 -0700)
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>
mm/mprotect.c

index 4c14d4289b61a69406140bfa9d0e1cf5919d99c7..5faf01ad3ef8aa13872f11456686e07f4e174df8 100644 (file)
@@ -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);