patch-2.4.0-test3 linux/arch/sparc/kernel/sys_sparc.c

Next file: linux/arch/sparc/kernel/sys_sunos.c
Previous file: linux/arch/sparc/kernel/sun4m_smp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test2/linux/arch/sparc/kernel/sys_sparc.c linux/arch/sparc/kernel/sys_sparc.c
@@ -1,4 +1,4 @@
-/* $Id: sys_sparc.c,v 1.63 2000/06/22 11:42:25 davem Exp $
+/* $Id: sys_sparc.c,v 1.65 2000/07/06 01:41:29 davem Exp $
  * linux/arch/sparc/kernel/sys_sparc.c
  *
  * This file contains various random system calls that
@@ -81,14 +81,12 @@
 	int fd[2];
 	int error;
 
-	lock_kernel();
 	error = do_pipe(fd);
 	if (error)
 		goto out;
 	regs->u_regs[UREG_I1] = fd[1];
 	error = fd[0];
 out:
-	unlock_kernel();
 	return error;
 }
 
@@ -102,7 +100,6 @@
 {
 	int version, err;
 
-	lock_kernel();
 	version = call >> 16; /* hack for backward compatibility */
 	call &= 0xffff;
 
@@ -197,7 +194,6 @@
 	else
 		err = -EINVAL;
 out:
-	unlock_kernel();
 	return err;
 }
 
@@ -215,8 +211,6 @@
 			goto out;
 	}
 
-	down(&current->mm->mmap_sem);
-	lock_kernel();
 	retval = -EINVAL;
 	len = PAGE_ALIGN(len);
 	if (ARCH_SUN4C_SUN4 &&
@@ -230,11 +224,11 @@
 		goto out_putf;
 
 	flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+	down(&current->mm->mmap_sem);
 	retval = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
+	up(&current->mm->mmap_sem);
 
 out_putf:
-	unlock_kernel();
-	up(&current->mm->mmap_sem);
 	if (file)
 		fput(file);
 out:

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)