* [PATCH 6/19] fix pgoff in "have to relocate" case of mremap()
@ 2009-12-07 3:52 Al Viro
0 siblings, 0 replies; only message in thread
From: Al Viro @ 2009-12-07 3:52 UTC (permalink / raw)
To: linux-arch; +Cc: torvalds, linux-kernel
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
mm/mremap.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/mm/mremap.c b/mm/mremap.c
index 84efffb..bbbbbf5 100644
--- a/mm/mremap.c
+++ b/mm/mremap.c
@@ -495,7 +495,9 @@ unsigned long do_mremap(unsigned long addr,
map_flags |= MAP_SHARED;
new_addr = get_unmapped_area(vma->vm_file, 0, new_len,
- vma->vm_pgoff, map_flags);
+ vma->vm_pgoff +
+ ((addr - vma->vm_start) >> PAGE_SHIFT),
+ map_flags);
if (new_addr & ~PAGE_MASK) {
ret = new_addr;
goto out;
--
1.5.6.5
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-12-07 3:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-07 3:52 [PATCH 6/19] fix pgoff in "have to relocate" case of mremap() Al Viro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome