From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) by kanga.kvack.org (Postfix) with ESMTP id A2FCC6B0036 for ; Fri, 27 Jun 2014 07:51:23 -0400 (EDT) Received: by mail-wg0-f41.google.com with SMTP id a1so5058108wgh.12 for ; Fri, 27 Jun 2014 04:51:23 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id ba6si17145392wib.17.2014.06.27.04.51.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Jun 2014 04:51:21 -0700 (PDT) Date: Fri, 27 Jun 2014 13:51:11 +0200 (CEST) From: =?ISO-8859-15?Q?Luk=E1=A8_Czerner?= Subject: Re: [PATCH] msync: fix incorrect fstart calculation In-Reply-To: <006a01cf91fc$5d225170$1766f450$@samsung.com> Message-ID: References: <006a01cf91fc$5d225170$1766f450$@samsung.com> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1417942477-1403869875=:2349" Sender: owner-linux-mm@kvack.org List-ID: To: Namjae Jeon Cc: 'Andrew Morton' , linux-mm@kvack.org, linux-ext4 , 'Matthew Wilcox' , 'Eric Whitney' , Ashish Sangwan This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1417942477-1403869875=:2349 Content-Type: TEXT/PLAIN; charset=iso-8859-2 Content-Transfer-Encoding: 8BIT On Fri, 27 Jun 2014, Namjae Jeon wrote: > Date: Fri, 27 Jun 2014 20:38:49 +0900 > From: Namjae Jeon > To: 'Andrew Morton' > Cc: linux-mm@kvack.org, linux-ext4 , > Luka1 Czerner , > 'Matthew Wilcox' , > 'Eric Whitney' , > Ashish Sangwan > Subject: [PATCH] msync: fix incorrect fstart calculation > > Fix a regression caused by Commit 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. Looks good to me and it fixes the issues with data=journal on ext4. Reviewed-by: Lukas Czerner Tested-by: Lukas Czerner > > Cc: Matthew Wilcox > Cc: Luka1 Czerner > Reported-by: Eric Whitney > Signed-off-by: Namjae Jeon > Signed-off-by: Ashish Sangwan > --- > mm/msync.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/mm/msync.c b/mm/msync.c > index a5c6736..ad97dce 100644 > --- a/mm/msync.c > +++ b/mm/msync.c > @@ -78,7 +78,8 @@ SYSCALL_DEFINE3(msync, unsigned long, start, size_t, len, int, flags) > 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 && > --8323328-1417942477-1403869875=:2349-- -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org