diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-01-29 01:41:54 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-01-29 01:41:54 +0000 |
commit | f969d69ba9f952e5bdd38278e25e26a3e4a61a70 (patch) | |
tree | b3530d803df59d726afaabebc6626987dee1ca05 /mm/mlock.c | |
parent | a10ce7ef2066b455d69187643ddf2073bfc4db24 (diff) |
Merge with 2.3.27.
Diffstat (limited to 'mm/mlock.c')
-rw-r--r-- | mm/mlock.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mm/mlock.c b/mm/mlock.c index 9709d1a04..59d11b922 100644 --- a/mm/mlock.c +++ b/mm/mlock.c @@ -7,6 +7,7 @@ #include <linux/shm.h> #include <linux/mman.h> #include <linux/smp_lock.h> +#include <linux/pagemap.h> #include <asm/uaccess.h> #include <asm/pgtable.h> @@ -35,7 +36,7 @@ static inline int mlock_fixup_start(struct vm_area_struct * vma, if (n->vm_ops && n->vm_ops->open) n->vm_ops->open(n); vmlist_modify_lock(vma->vm_mm); - vma->vm_offset += end - vma->vm_start; + vma->vm_pgoff += (end - vma->vm_start) >> PAGE_SHIFT; vma->vm_start = end; insert_vm_struct(current->mm, n); vmlist_modify_unlock(vma->vm_mm); @@ -52,7 +53,7 @@ static inline int mlock_fixup_end(struct vm_area_struct * vma, return -EAGAIN; *n = *vma; n->vm_start = start; - n->vm_offset += n->vm_start - vma->vm_start; + n->vm_pgoff += (n->vm_start - vma->vm_start) >> PAGE_SHIFT; n->vm_flags = newflags; if (n->vm_file) get_file(n->vm_file); @@ -82,7 +83,7 @@ static inline int mlock_fixup_middle(struct vm_area_struct * vma, *right = *vma; left->vm_end = start; right->vm_start = end; - right->vm_offset += right->vm_start - left->vm_start; + right->vm_pgoff += (right->vm_start - left->vm_start) >> PAGE_SHIFT; vma->vm_flags = newflags; if (vma->vm_file) atomic_add(2, &vma->vm_file->f_count); @@ -92,7 +93,7 @@ static inline int mlock_fixup_middle(struct vm_area_struct * vma, vma->vm_ops->open(right); } vmlist_modify_lock(vma->vm_mm); - vma->vm_offset += start - vma->vm_start; + vma->vm_pgoff += (start - vma->vm_start) >> PAGE_SHIFT; vma->vm_start = start; vma->vm_end = end; vma->vm_flags = newflags; |