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-04 09:14:17 -0500 |
commit | a9ca8af31de8ce3e5bd79daad3dcdac5ec790028 (patch) | |
tree | adb727ee936253e6bc7a395acf59f577a6983037 /arch/x86/mm | |
parent | e3b7d062b78095a5249a0c50fcccaa83c03542a3 (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/mm')
-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 191015fd836b..b567837c8374 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c @@ -1084,7 +1084,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; } |