From Trond.Myklebust@netapp.com Wed Apr 18 03:25:40 2007 Received: from localhost (localhost [127.0.0.1]) by gateway.programming.kicks-ass.net (Postfix) with ESMTP id F142811FBF1 for ; Wed, 18 Apr 2007 03:25:40 +0200 (CEST) Received: from mail.chello.nl [213.46.243.2] by localhost with POP3 (fetchmail-6.2.2) for peter@programming.kicks-ass.net (single-drop); Wed, 18 Apr 2007 03:25:42 +0200 (CEST) Received: from heimdal.trondhjem.org ([69.242.210.120]) by amsfep11-int.chello.nl (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20070418012931.DWWT25741.amsfep11-int.chello.nl@heimdal.trondhjem.org> for ; Wed, 18 Apr 2007 03:29:31 +0200 Received: from heimdal.trondhjem.org (localhost [127.0.0.1]) by heimdal.trondhjem.org (Postfix) with ESMTP id 1282114228; Tue, 17 Apr 2007 21:29:31 -0400 (EDT) From: Trond Myklebust Subject: [PATCH 2/4] NFS: Don't clear PG_writeback until after we've processed unstable writes Date: Tue, 17 Apr 2007 21:29:31 -0400 To: Peter Zijlstra Cc: Linus Torvalds , Florin Iucha , Andrew Morton , Adrian Bunk , OGAWA Hirofumi , linux-kernel@vger.kernel.org Message-Id: <20070418012931.11679.60451.stgit@heimdal.trondhjem.org> In-Reply-To: <20070418011946.11679.34920.stgit@heimdal.trondhjem.org> References: <20070418011946.11679.34920.stgit@heimdal.trondhjem.org> Content-Type: text/plain; charset=utf-8; format=fixed User-Agent: StGIT/0.11 X-Spam-Checker-Version: SpamAssassin 3.0.3-gr0 (2005-04-27) on server X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.0.3-gr0 X-Evolution-Source: imap://peter%40programming.kicks-ass.net@programming.kicks-ass.net/ Content-Transfer-Encoding: 8bit Mime-Version: 1.0 From: Trond Myklebust Ensure that we don't release the PG_writeback lock until after the page has either been redirtied, or queued on the nfs_inode 'commit' list. Signed-off-by: Trond Myklebust --- fs/nfs/write.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 3ed4feb..8e94246 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -920,8 +920,8 @@ out_bad: list_del(&data->pages); nfs_writedata_release(data); } - nfs_end_page_writeback(req->wb_page); nfs_redirty_request(req); + nfs_end_page_writeback(req->wb_page); nfs_clear_page_writeback(req); return -ENOMEM; } @@ -966,8 +966,8 @@ static int nfs_flush_one(struct inode *inode, struct list_head *head, int how) while (!list_empty(head)) { struct nfs_page *req = nfs_list_entry(head->next); nfs_list_remove_request(req); - nfs_end_page_writeback(req->wb_page); nfs_redirty_request(req); + nfs_end_page_writeback(req->wb_page); nfs_clear_page_writeback(req); } return -ENOMEM; @@ -1002,8 +1002,8 @@ out_err: while (!list_empty(head)) { req = nfs_list_entry(head->next); nfs_list_remove_request(req); - nfs_end_page_writeback(req->wb_page); nfs_redirty_request(req); + nfs_end_page_writeback(req->wb_page); nfs_clear_page_writeback(req); } return error;