From: Nick Piggin Subject: Re: [PATCH 1/2] AFS: Fix afs_prepare_write() Date: Wed, 16 May 2007 10:24:38 +1000 Message-ID: <464A4F46.9060007@yahoo.com.au> References: <20070515155224.29345.22719.stgit@warthog.cambridge.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: akpm@osdl.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: David Howells Return-path: Received: from smtp101.mail.mud.yahoo.com ([209.191.85.211]:42327 "HELO smtp101.mail.mud.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1759488AbXEPAYv (ORCPT ); Tue, 15 May 2007 20:24:51 -0400 In-Reply-To: <20070515155224.29345.22719.stgit@warthog.cambridge.redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org David Howells wrote: > afs_prepare_write() should not mark a page up to date if it only partially > fills it in, in expectation of the caller filling in the rest prior to calling > commit_write(). commit_write(), however, should mark the page up to date. Acked-by: Nick Piggin > > Signed-off-by: David Howells > --- > > fs/afs/write.c | 3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-) > > diff --git a/fs/afs/write.c b/fs/afs/write.c > index 28f3751..a03b92a 100644 > --- a/fs/afs/write.c > +++ b/fs/afs/write.c > @@ -206,7 +206,6 @@ int afs_prepare_write(struct file *file, struct page *page, > _leave(" = %d [prep]", ret); > return ret; > } > - SetPageUptodate(page); > } > > try_again: > @@ -311,8 +310,8 @@ int afs_commit_write(struct file *file, struct page *page, > spin_unlock(&vnode->writeback_lock); > } > > + SetPageUptodate(page); > set_page_dirty(page); > - > if (PageDirty(page)) > _debug("dirtied"); > > > -- SUSE Labs, Novell Inc.