The patch titled Subject: msync: fix incorrect fstart calculation has been added to the -mm tree. Its filename is msync-fix-incorrect-fstart-calculation.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/msync-fix-incorrect-fstart-calculation.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/msync-fix-incorrect-fstart-calculation.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Namjae Jeon <namjae.jeon@xxxxxxxxxxx> Subject: msync: fix incorrect fstart calculation Fix a regression caused by 7fc34a62ca ("mm/msync.c: sync only the requested range in msync()"). xfstests generic/075 fail occured on ext4 data=journal mode because the intended range was not syncing due to wrong fstart calculation. Signed-off-by: Namjae Jeon <namjae.jeon@xxxxxxxxxxx> Signed-off-by: Ashish Sangwan <a.sangwan@xxxxxxxxxxx> Reported-by: Eric Whitney <enwlinux@xxxxxxxxx> Tested-by: Eric Whitney <enwlinux@xxxxxxxxx> Acked-by: Matthew Wilcox <matthew.r.wilcox@xxxxxxxxx> Reviewed-by: Lukas Czerner <lczerner@xxxxxxxxxx> Tested-by: Lukas Czerner <lczerner@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/msync.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN mm/msync.c~msync-fix-incorrect-fstart-calculation mm/msync.c --- a/mm/msync.c~msync-fix-incorrect-fstart-calculation +++ a/mm/msync.c @@ -78,7 +78,8 @@ SYSCALL_DEFINE3(msync, unsigned long, st goto out_unlock; } file = vma->vm_file; - fstart = start + ((loff_t)vma->vm_pgoff << PAGE_SHIFT); + fstart = (start - vma->vm_start) + + ((loff_t)vma->vm_pgoff << PAGE_SHIFT); fend = fstart + (min(end, vma->vm_end) - start) - 1; start = vma->vm_end; if ((flags & MS_SYNC) && file && _ Patches currently in -mm which might be from namjae.jeon@xxxxxxxxxxx are msync-fix-incorrect-fstart-calculation.patch linux-next.patch fat-add-i_disksize-to-represent-uninitialized-size-v4.patch fat-add-fat_fallocate-operation-v4.patch fat-zero-out-seek-range-on-_fat_get_block-v4.patch fat-fallback-to-buffered-write-in-case-of-fallocated-region-on-direct-io-v4.patch fat-permit-to-return-phy-block-number-by-fibmap-in-fallocated-region-v4.patch documentation-filesystems-vfattxt-update-the-limitation-for-fat-fallocate-v4.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html