diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2011-08-11 15:31:31 +0200 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2014-10-31 10:54:07 -0400 |
commit | 727c87038bdc3a7d5f80ff9f73cceeb151347a1f (patch) | |
tree | 5b4b1ab602237c35bb64f56928976cfc837c40b9 /arch/x86 | |
parent | a17bb4e2e01cd0fd2d5e1cbdab60898083ff9a36 (diff) |
mm: pagefault_disabled()
Wrap the test for pagefault_disabled() into a helper, this allows us
to remove the need for current->pagefault_disabled on !-rt kernels.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-3yy517m8zsi9fpsf14xfaqkw@git.kernel.org
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/mm/fault.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index c0d3d2fe8df1..e0582e9017a3 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c @@ -1103,7 +1103,7 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code, * If we're in an interrupt, have no user context or are running * in an atomic region then we must not take the fault: */ - if (unlikely(in_atomic() || !mm || current->pagefault_disabled)) { + if (unlikely(!mm || pagefault_disabled())) { bad_area_nosemaphore(regs, error_code, address); return; } |