aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Lespinasse <walken@google.com>2010-10-26 17:21:58 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-26 19:52:09 -0400
commit68da336a14e16c2de95e987f3200995b707d7038 (patch)
treeb565df1ab3a795e05c5273dd4d46ba61cbdcbae9
parentd065bd810b6deb67d4897a14bfe21f8eb526ba99 (diff)
x86: access_error API cleanup
access_error() already takes error_code as an argument, so there is no need for an additional write flag. Signed-off-by: Michel Lespinasse <walken@google.com> Acked-by: Rik van Riel <riel@redhat.com> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Acked-by: Wu Fengguang <fengguang.wu@intel.com> Cc: Ying Han <yinghan@google.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Acked-by: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/x86/mm/fault.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 9b2345c9e0c3..7d90ceb882a4 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -919,9 +919,9 @@ spurious_fault(unsigned long error_code, unsigned long address)
919int show_unhandled_signals = 1; 919int show_unhandled_signals = 1;
920 920
921static inline int 921static inline int
922access_error(unsigned long error_code, int write, struct vm_area_struct *vma) 922access_error(unsigned long error_code, struct vm_area_struct *vma)
923{ 923{
924 if (write) { 924 if (error_code & PF_WRITE) {
925 /* write, present and write, not present: */ 925 /* write, present and write, not present: */
926 if (unlikely(!(vma->vm_flags & VM_WRITE))) 926 if (unlikely(!(vma->vm_flags & VM_WRITE)))
927 return 1; 927 return 1;
@@ -1114,7 +1114,7 @@ retry:
1114 * we can handle it.. 1114 * we can handle it..
1115 */ 1115 */
1116good_area: 1116good_area:
1117 if (unlikely(access_error(error_code, write, vma))) { 1117 if (unlikely(access_error(error_code, vma))) {
1118 bad_area_access_error(regs, error_code, address); 1118 bad_area_access_error(regs, error_code, address);
1119 return; 1119 return;
1120 } 1120 }