From: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx> 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 <Trond.Myklebust@xxxxxxxxxx> --- 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 = { - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html