summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2017-04-05 09:24:50 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2017-04-07 17:40:06 +1000
commit95724ed4ffdc7e55e9b521bae452c34c8b21efc5 (patch)
tree11b69506f4ea84471c5fef7d4f0566be14dceff3
parent0a8bebbc7d6cc0a18fdf7c91ed0b84db7967c1cd (diff)
include/linux/uaccess.h: remove expensive WARN_ON in pagefault_disabled_dec
pagefault_disabled_dec is frequently used inline, and it has a WARN_ON for underflow that expands to about 6.5k of extra code. The warning doesn't seem to be that useful and worth so much code so remove it. If it was needed could make it depending on some debug kernel option. Saves ~6.5k in my kernel text data bss dec hex filename 9039417 5367568 11116544 25523529 1857549 vmlinux-before-pf 9032805 5367568 11116544 25516917 1855b75 vmlinux-pf Link: http://lkml.kernel.org/r/20170315021431.13107-8-andi@firstfloor.org Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--include/linux/uaccess.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h
index e0cbfb09e60f..201418d5e15c 100644
--- a/include/linux/uaccess.h
+++ b/include/linux/uaccess.h
@@ -203,7 +203,6 @@ static __always_inline void pagefault_disabled_inc(void)
static __always_inline void pagefault_disabled_dec(void)
{
current->pagefault_disabled--;
- WARN_ON(current->pagefault_disabled < 0);
}
/*