projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
097eed1
)
fix pgoff in "have to relocate" case of mremap()
author
Al Viro
<viro@zeniv.linux.org.uk>
Tue, 24 Nov 2009 13:45:24 +0000
(08:45 -0500)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Fri, 11 Dec 2009 11:30:23 +0000
(06:30 -0500)
Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
mm/mremap.c
patch
|
blob
|
history
diff --git
a/mm/mremap.c
b/mm/mremap.c
index 84efffb2d2c4e2de0c2574a11fce4d558eb78b45..bbbbbf507ff347e0a66be4bef63c33a182a90a4f 100644
(file)
--- 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;