summaryrefslogtreecommitdiffstats
path: root/mm/mlock.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2001-04-05 04:55:58 +0000
committerRalf Baechle <ralf@linux-mips.org>2001-04-05 04:55:58 +0000
commit74a9f2e1b4d3ab45a9f72cb5b556c9f521524ab3 (patch)
tree7c4cdb103ab1b388c9852a88bd6fb1e73eba0b5c /mm/mlock.c
parentee6374c8b0d333c08061c6a97bc77090d7461225 (diff)
Merge with Linux 2.4.3.
Note that mingetty does no longer work with serial console, you have to switch to another getty like getty_ps. This commit also includes a fix for a setitimer bug which did prevent getty_ps from working on older kernels.
Diffstat (limited to 'mm/mlock.c')
-rw-r--r--mm/mlock.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/mm/mlock.c b/mm/mlock.c
index 16e9f947b..75bca3639 100644
--- a/mm/mlock.c
+++ b/mm/mlock.c
@@ -198,7 +198,7 @@ asmlinkage long sys_mlock(unsigned long start, size_t len)
unsigned long lock_limit;
int error = -ENOMEM;
- down(&current->mm->mmap_sem);
+ down_write(&current->mm->mmap_sem);
len = PAGE_ALIGN(len + (start & ~PAGE_MASK));
start &= PAGE_MASK;
@@ -219,7 +219,7 @@ asmlinkage long sys_mlock(unsigned long start, size_t len)
error = do_mlock(start, len, 1);
out:
- up(&current->mm->mmap_sem);
+ up_write(&current->mm->mmap_sem);
return error;
}
@@ -227,11 +227,11 @@ asmlinkage long sys_munlock(unsigned long start, size_t len)
{
int ret;
- down(&current->mm->mmap_sem);
+ down_write(&current->mm->mmap_sem);
len = PAGE_ALIGN(len + (start & ~PAGE_MASK));
start &= PAGE_MASK;
ret = do_mlock(start, len, 0);
- up(&current->mm->mmap_sem);
+ up_write(&current->mm->mmap_sem);
return ret;
}
@@ -268,7 +268,7 @@ asmlinkage long sys_mlockall(int flags)
unsigned long lock_limit;
int ret = -EINVAL;
- down(&current->mm->mmap_sem);
+ down_write(&current->mm->mmap_sem);
if (!flags || (flags & ~(MCL_CURRENT | MCL_FUTURE)))
goto out;
@@ -286,7 +286,7 @@ asmlinkage long sys_mlockall(int flags)
ret = do_mlockall(flags);
out:
- up(&current->mm->mmap_sem);
+ up_write(&current->mm->mmap_sem);
return ret;
}
@@ -294,8 +294,8 @@ asmlinkage long sys_munlockall(void)
{
int ret;
- down(&current->mm->mmap_sem);
+ down_write(&current->mm->mmap_sem);
ret = do_mlockall(0);
- up(&current->mm->mmap_sem);
+ up_write(&current->mm->mmap_sem);
return ret;
}