patch-2.4.0-test2 linux/arch/mips64/kernel/syscall.c
Next file: linux/arch/mips64/sgi-ip27/ip27-rtc.c
Previous file: linux/arch/mips64/config.in
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
Tue Jun 20 07:24:52 2000
- Orig file:
v2.4.0-test1/linux/arch/mips64/kernel/syscall.c
- Orig date:
Tue May 23 15:31:33 2000
diff -u --recursive --new-file v2.4.0-test1/linux/arch/mips64/kernel/syscall.c linux/arch/mips64/kernel/syscall.c
@@ -56,7 +56,6 @@
struct file * file = NULL;
unsigned long error = -EFAULT;
- down(¤t->mm->mmap_sem);
lock_kernel();
if (!(flags & MAP_ANONYMOUS)) {
error = -EBADF;
@@ -66,12 +65,13 @@
}
flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+ down(¤t->mm->mmap_sem);
error = do_mmap(file, addr, len, prot, flags, offset);
+ up(¤t->mm->mmap_sem);
if (file)
fput(file);
out:
unlock_kernel();
- up(¤t->mm->mmap_sem);
return error;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)