diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2011-08-11 15:31:31 +0200 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-04-13 11:01:19 -0500 |
commit | 6cf839a189e681a1f7a3619c100ff7a293e1ac13 (patch) | |
tree | 4dc54ab99eab8b4f11a1003afb8266f9b6800952 /arch/x86 | |
parent | 9876b802c9938d40895e4bdb10e24b2c0ff6b2e2 (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 bb891f2ba5f5..9d57357c2e1d 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c @@ -1094,7 +1094,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; } |