Re: 2.6.16-rc6-mm2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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++;
 			}
 		}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux