aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mremap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/mremap.c')
-rw-r--r--mm/mremap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/mremap.c b/mm/mremap.c
index 84efffb2d2c4..bbbbbf507ff3 100644
--- a/mm/mremap.c
+++ b/mm/mremap.c
@@ -495,7 +495,9 @@ unsigned long do_mremap(unsigned long addr,
495 map_flags |= MAP_SHARED; 495 map_flags |= MAP_SHARED;
496 496
497 new_addr = get_unmapped_area(vma->vm_file, 0, new_len, 497 new_addr = get_unmapped_area(vma->vm_file, 0, new_len,
498 vma->vm_pgoff, map_flags); 498 vma->vm_pgoff +
499 ((addr - vma->vm_start) >> PAGE_SHIFT),
500 map_flags);
499 if (new_addr & ~PAGE_MASK) { 501 if (new_addr & ~PAGE_MASK) {
500 ret = new_addr; 502 ret = new_addr;
501 goto out; 503 goto out;