patch-2.1.113 linux/arch/m68k/mm/fault.c

Next file: linux/arch/m68k/mm/init.c
Previous file: linux/arch/m68k/mac/mackeyb.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.112/linux/arch/m68k/mm/fault.c linux/arch/m68k/mm/fault.c
@@ -45,9 +45,10 @@
 #endif
 
 	down(&mm->mmap_sem);
+
 	vma = find_vma(mm, address);
 	if (!vma)
-	  goto bad_area;
+		goto bad_area;
 	if (vma->vm_flags & VM_IO)
 		goto bad_area;
 	if (vma->vm_start <= address)
@@ -86,7 +87,6 @@
 				goto bad_area;
 	}
 	handle_mm_fault(current, vma, address, write);
-	up(&mm->mmap_sem);
 
 	/* There seems to be a missing invalidate somewhere in do_no_page.
 	 * Until I found it, this one cures the problem and makes
@@ -94,6 +94,7 @@
 	 */
 	if (CPU_IS_040_OR_060)
 		flush_tlb_page(vma, address);
+	up(&mm->mmap_sem);
 	return 0;
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov