From mboxrd@z Thu Jan 1 00:00:00 1970 From: Trond Myklebust Subject: [PATCH 2/2] NFS: missing set_page_writeback()/end_page_writeback() in nfs_cancel_requests Date: Mon, 26 Jun 2006 19:32:07 -0400 Message-ID: <20060626233206.6228.95805.stgit@lade.trondhjem.org> References: <20060626233204.6228.86324.stgit@lade.trondhjem.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, nfs@lists.sourceforge.net Return-path: To: linux-kernel@vger.kernel.org In-Reply-To: <20060626233204.6228.86324.stgit@lade.trondhjem.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: nfs-bounces@lists.sourceforge.net Errors-To: nfs-bounces@lists.sourceforge.net List-Id: linux-fsdevel.vger.kernel.org From: Trond Myklebust Signed-off-by: Trond Myklebust --- fs/nfs/write.c | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-) diff --git a/fs/nfs/write.c b/fs/nfs/write.c index d054f12..fe3eb36 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -579,7 +579,23 @@ static int nfs_wait_on_requests(struct i return ret; } -static void nfs_cancel_requests(struct list_head *head) +static void nfs_cancel_dirty_list(struct list_head *head) +{ + struct nfs_page *req; + while(!list_empty(head)) { + req = nfs_list_entry(head->next); + nfs_list_remove_request(req); + /* Hack, cough, splutter! + * Wretched borken mm requires us to do this... + */ + set_page_writeback(req->wb_page); + end_page_writeback(req->wb_page); + nfs_inode_remove_request(req); + nfs_clear_page_writeback(req); + } +} + +static void nfs_cancel_commit_list(struct list_head *head) { struct nfs_page *req; while(!list_empty(head)) { @@ -1503,7 +1519,7 @@ int nfs_sync_inode_wait(struct inode *in if (pages != 0) { spin_unlock(&nfsi->req_lock); if (how & FLUSH_INVALIDATE) - nfs_cancel_requests(&head); + nfs_cancel_dirty_list(&head); else ret = nfs_flush_list(inode, &head, pages, how); spin_lock(&nfsi->req_lock); @@ -1516,7 +1532,7 @@ int nfs_sync_inode_wait(struct inode *in break; if (how & FLUSH_INVALIDATE) { spin_unlock(&nfsi->req_lock); - nfs_cancel_requests(&head); + nfs_cancel_commit_list(&head); spin_lock(&nfsi->req_lock); continue; } Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ NFS maillist - NFS@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs