patch-2.3.43 linux/mm/mlock.c
Next file: linux/mm/mmap.c
Previous file: linux/mm/filemap.c
Back to the patch index
Back to the overall index
- Lines: 27
- Date:
Mon Feb 7 19:45:28 2000
- Orig file:
v2.3.42/linux/mm/mlock.c
- Orig date:
Mon Nov 1 13:56:27 1999
diff -u --recursive --new-file v2.3.42/linux/mm/mlock.c linux/mm/mlock.c
@@ -142,7 +142,7 @@
if (on && !capable(CAP_IPC_LOCK))
return -EPERM;
- len = (len + ~PAGE_MASK) & PAGE_MASK;
+ len = PAGE_ALIGN(len);
end = start + len;
if (end < start)
return -EINVAL;
@@ -191,7 +191,7 @@
int error = -ENOMEM;
down(¤t->mm->mmap_sem);
- len = (len + (start & ~PAGE_MASK) + ~PAGE_MASK) & PAGE_MASK;
+ len = PAGE_ALIGN(len + (start & ~PAGE_MASK));
start &= PAGE_MASK;
locked = len >> PAGE_SHIFT;
@@ -220,7 +220,7 @@
int ret;
down(¤t->mm->mmap_sem);
- len = (len + (start & ~PAGE_MASK) + ~PAGE_MASK) & PAGE_MASK;
+ len = PAGE_ALIGN(len + (start & ~PAGE_MASK));
start &= PAGE_MASK;
ret = do_mlock(start, len, 0);
up(¤t->mm->mmap_sem);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)