Update of /cvsroot/linuxconsole/ruby/linux/arch/i386/mm
In directory usw-pr-cvs1:/tmp/cvs-serv10580/linux/arch/i386/mm
Modified Files:
fault.c
Log Message:
Syned to 2.5.25
Index: fault.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/arch/i386/mm/fault.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- fault.c 22 Mar 2002 20:13:57 -0000 1.10
+++ fault.c 10 Jul 2002 18:08:02 -0000 1.11
@@ -56,12 +56,16 @@
for (;;) {
survive:
- {
- int fault = handle_mm_fault(current->mm, vma, start, 1);
- if (!fault)
+ switch (handle_mm_fault(current->mm, vma, start, 1)) {
+ case VM_FAULT_SIGBUS:
goto bad_area;
- if (fault < 0)
+ case VM_FAULT_OOM:
goto out_of_memory;
+ case VM_FAULT_MINOR:
+ case VM_FAULT_MAJOR:
+ break;
+ default:
+ BUG();
}
if (!size)
break;
@@ -237,16 +241,18 @@
* the fault.
*/
switch (handle_mm_fault(mm, vma, address, write)) {
- case 1:
- tsk->min_flt++;
- break;
- case 2:
- tsk->maj_flt++;
- break;
- case 0:
- goto do_sigbus;
- default:
- goto out_of_memory;
+ case VM_FAULT_MINOR:
+ tsk->min_flt++;
+ break;
+ case VM_FAULT_MAJOR:
+ tsk->maj_flt++;
+ break;
+ case VM_FAULT_SIGBUS:
+ goto do_sigbus;
+ case VM_FAULT_OOM:
+ goto out_of_memory;
+ default:
+ BUG();
}
/*
|