patch-2.1.113 linux/arch/m68k/atari/stram.c

Next file: linux/arch/m68k/config.in
Previous file: linux/arch/m68k/atari/config.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.112/linux/arch/m68k/atari/stram.c linux/arch/m68k/atari/stram.c
@@ -826,18 +826,23 @@
 						   unsigned long page, int isswap )
 {
 	struct vm_area_struct* vma;
+	int retval = 0;
 
 	/*
 	 * Go through process' page directory.
 	 */
 	if (!mm || mm == &init_mm)
 		return 0;
+	down(&mm->mmap_sem);
 	for( vma = mm->mmap; vma; vma = vma->vm_next ) {
 		pgd_t * pgd = pgd_offset(mm, vma->vm_start);
-		if (unswap_vma( vma, pgd, entry, page, isswap ))
-			return 1;
+		if (unswap_vma( vma, pgd, entry, page, isswap )) {
+			retval = 1;
+			break;
+		}
 	}
-	return 0;
+	up(&mm->mmap_sem);
+	return retval;
 }
 
 
@@ -1160,7 +1165,7 @@
 
 
 /* setup parameters from command line */
-void stram_swap_setup( char *str, int *ints )
+__initfunc(void stram_swap_setup(char *str, int *ints))
 {
 	if (ints[0] >= 1)
 		max_swap_size = ((ints[1] < 0 ? 0 : ints[1]) * 1024) & PAGE_MASK;
@@ -1256,7 +1261,7 @@
         block_fsync             /* fsync */
 };
 
-int stram_device_init( void )
+__initfunc(int stram_device_init(void))
 {
 
     if (!MACH_IS_ATARI)

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