From mboxrd@z Thu Jan 1 00:00:00 1970 From: Trond Myklebust Subject: [PATCH 1/2] NFS: Fix NFS page_state usage Date: Mon, 26 Jun 2006 19:32:04 -0400 Message-ID: <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 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 The introduction of the FLUSH_INVALIDATE argument to nfs_sync_inode_wait() can cause the nr_unstable page state counter to be corrupted. Fix by moving the call to sub_page_state() to inside nfs_scan_commit(). Signed-off-by: Trond Myklebust --- fs/nfs/write.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/nfs/write.c b/fs/nfs/write.c index b383fdd..d054f12 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -636,6 +636,7 @@ nfs_scan_commit(struct inode *inode, str if (nfsi->ncommit != 0) { res = nfs_scan_list(nfsi, &nfsi->commit, dst, idx_start, npages); nfsi->ncommit -= res; + sub_page_state(nr_unstable,res); if ((nfsi->ncommit == 0) != list_empty(&nfsi->commit)) printk(KERN_ERR "NFS: desynchronized value of nfs_i.ncommit.\n"); } @@ -1434,7 +1435,6 @@ static void nfs_commit_done(struct rpc_t nfs_clear_page_writeback(req); res++; } - sub_page_state(nr_unstable,res); } static const struct rpc_call_ops nfs_commit_ops = { 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