From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751152AbdFBCck (ORCPT ); Thu, 1 Jun 2017 22:32:40 -0400 Received: from fldsmtpe03.verizon.com ([140.108.26.142]:62210 "EHLO fldsmtpe03.verizon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751120AbdFBCcj (ORCPT ); Thu, 1 Jun 2017 22:32:39 -0400 X-IronPort-Anti-Spam-Filtered: false From: "Levin, Alexander (Sasha Levin)" X-IronPort-AV: E=Sophos;i="5.39,282,1493683200"; d="scan'208";a="363186315" To: "ericvh@gmail.com" , "rminnich@sandia.gov" , "lucho@ionkov.net" CC: "v9fs-developer@lists.sourceforge.net" , "linux-kernel@vger.kernel.org" , "jack@suse.com" , "viro@zeniv.linux.org.uk" Subject: Re: [PATCH] 9p: set page uptodate when required in write_end() Thread-Topic: [PATCH] 9p: set page uptodate when required in write_end() Thread-Index: AQHSsirRaZAdjOarXE+CQy9Z9zTlZKIRgBKA Date: Fri, 2 Jun 2017 02:31:14 +0000 Message-ID: <20170602023109.4sr6zz4dgh3e6syn@sasha-lappy> References: <20170410184657.13430-1-alexander.levin@verizon.com> In-Reply-To: <20170410184657.13430-1-alexander.levin@verizon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: NeoMutt/20170113 (1.7.2) x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] Content-Type: text/plain; charset="us-ascii" Content-ID: <15399D5B46CA5C4F83A2601434DC3F1B@vzwcorp.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v522WiYS014202 Ping? On Mon, Apr 10, 2017 at 02:46:57PM -0400, Sasha Levin wrote: > From: Alexander Levin > > Commit 77469c3f570 prevented setting the page as uptodate when we wrote the > right amount of data, fix that. > > Fixes: 77469c3f570 ("9p: saner ->write_end() on failing copy into non-uptodate page") > Reviewed-by: Jan Kara > Signed-off-by: Alexander Levin > --- > fs/9p/vfs_addr.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c > index adaf6f6..e1cbdfd 100644 > --- a/fs/9p/vfs_addr.c > +++ b/fs/9p/vfs_addr.c > @@ -310,9 +310,13 @@ static int v9fs_write_end(struct file *filp, struct address_space *mapping, > > p9_debug(P9_DEBUG_VFS, "filp %p, mapping %p\n", filp, mapping); > > - if (unlikely(copied < len && !PageUptodate(page))) { > - copied = 0; > - goto out; > + if (!PageUptodate(page)) { > + if (unlikely(copied < len)) { > + copied = 0; > + goto out; > + } else if (len == PAGE_SIZE) { > + SetPageUptodate(page); > + } > } > /* > * No need to use i_size_read() here, the i_size > -- > 2.7.4 -- Thanks, Sasha