diff options
Diffstat (limited to 'arch/m32r/mm')
-rw-r--r-- | arch/m32r/mm/fault.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c index f3935ba24946..676a1c443d28 100644 --- a/arch/m32r/mm/fault.c +++ b/arch/m32r/mm/fault.c | |||
@@ -80,6 +80,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code, | |||
80 | struct vm_area_struct * vma; | 80 | struct vm_area_struct * vma; |
81 | unsigned long page, addr; | 81 | unsigned long page, addr; |
82 | int write; | 82 | int write; |
83 | int fault; | ||
83 | siginfo_t info; | 84 | siginfo_t info; |
84 | 85 | ||
85 | /* | 86 | /* |
@@ -195,20 +196,18 @@ survive: | |||
195 | */ | 196 | */ |
196 | addr = (address & PAGE_MASK); | 197 | addr = (address & PAGE_MASK); |
197 | set_thread_fault_code(error_code); | 198 | set_thread_fault_code(error_code); |
198 | switch (handle_mm_fault(mm, vma, addr, write)) { | 199 | fault = handle_mm_fault(mm, vma, addr, write); |
199 | case VM_FAULT_MINOR: | 200 | if (unlikely(fault & VM_FAULT_ERROR)) { |
200 | tsk->min_flt++; | 201 | if (fault & VM_FAULT_OOM) |
201 | break; | ||
202 | case VM_FAULT_MAJOR: | ||
203 | tsk->maj_flt++; | ||
204 | break; | ||
205 | case VM_FAULT_SIGBUS: | ||
206 | goto do_sigbus; | ||
207 | case VM_FAULT_OOM: | ||
208 | goto out_of_memory; | 202 | goto out_of_memory; |
209 | default: | 203 | else if (fault & VM_FAULT_SIGBUS) |
210 | BUG(); | 204 | goto do_sigbus; |
205 | BUG(); | ||
211 | } | 206 | } |
207 | if (fault & VM_FAULT_MAJOR) | ||
208 | tsk->maj_flt++; | ||
209 | else | ||
210 | tsk->min_flt++; | ||
212 | set_thread_fault_code(0); | 211 | set_thread_fault_code(0); |
213 | up_read(&mm->mmap_sem); | 212 | up_read(&mm->mmap_sem); |
214 | return; | 213 | return; |