diff options
Diffstat (limited to 'mm/msync.c')
-rw-r--r-- | mm/msync.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/msync.c b/mm/msync.c index a5c673669ca6..992a1673d488 100644 --- a/mm/msync.c +++ b/mm/msync.c | |||
@@ -78,7 +78,8 @@ SYSCALL_DEFINE3(msync, unsigned long, start, size_t, len, int, flags) | |||
78 | goto out_unlock; | 78 | goto out_unlock; |
79 | } | 79 | } |
80 | file = vma->vm_file; | 80 | file = vma->vm_file; |
81 | fstart = start + ((loff_t)vma->vm_pgoff << PAGE_SHIFT); | 81 | fstart = (start - vma->vm_start) + |
82 | ((loff_t)vma->vm_pgoff << PAGE_SHIFT); | ||
82 | fend = fstart + (min(end, vma->vm_end) - start) - 1; | 83 | fend = fstart + (min(end, vma->vm_end) - start) - 1; |
83 | start = vma->vm_end; | 84 | start = vma->vm_end; |
84 | if ((flags & MS_SYNC) && file && | 85 | if ((flags & MS_SYNC) && file && |