Re: 2.6.16-rc6-mm2

Christoph Lameter
2006-06-13T21:13:50Z

On Tue, 13 Jun 2006, Cedric Le Goater wrote:

> NFS write seems to work fine with that patch. No more oops.

Sigh. There is another issue that the NR_DIRTY count is not decremented.

Which brings us to this fix:

Index: linux-2.6.17-rc6-mm2/fs/nfs/write.c
===================================================================
--- linux-2.6.17-rc6-mm2.orig/fs/nfs/write.c 2006-06-10 11:11:53.051397816 -0700
+++ linux-2.6.17-rc6-mm2/fs/nfs/write.c 2006-06-13 10:52:04.428456013 -0700
@@ -1418,8 +1418,9 @@ static void nfs_commit_done(struct rpc_t
dprintk(" mismatch\n");
nfs_mark_request_dirty(req);
next:
+ if (req->wb_page)
+ dec_zone_page_state(req->wb_page, NR_UNSTABLE);
nfs_clear_page_writeback(req);
- dec_zone_page_state(req->wb_page, NR_UNSTABLE);
}
}

Index: linux-2.6.17-rc6-mm2/fs/nfs/pagelist.c
===================================================================
--- linux-2.6.17-rc6-mm2.orig/fs/nfs/pagelist.c 2006-06-10 11:11:53.049444812 -0700
+++ linux-2.6.17-rc6-mm2/fs/nfs/pagelist.c 2006-06-13 14:12:17.963198388 -0700
@@ -154,6 +154,7 @@ void nfs_clear_request(struct nfs_page *
{
struct page *page = req->wb_page;
if (page != NULL) {
+ dec_zone_page_state(page, NR_UNSTABLE);
page_cache_release(page);
req->wb_page = NULL;
}
@@ -315,7 +316,7 @@ nfs_scan_lock_dirty(struct nfs_inode *nf
req->wb_index, NFS_PAGE_TAG_DIRTY);
nfs_list_remove_request(req);
nfs_list_add_request(req, dst);
- inc_zone_page_state(req->wb_page, NR_DIRTY);
+ dec_zone_page_state(req->wb_page, NR_DIRTY);
res++;
}
}