public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfs: fix NR_FILE_DIRTY underflow
@ 2006-12-13 12:12 Peter Zijlstra
  2006-12-13 12:26 ` Trond Myklebust
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Zijlstra @ 2006-12-13 12:12 UTC (permalink / raw)
  To: Andrew Morton, Trond Myklebust; +Cc: linux-kernel

Still testing this patch, but it looks good so far.

---
Just setting PG_dirty can cause NR_FILE_DIRTY to underflow
which is bad (TM).

Use set_page_dirty() which will do the right thing.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
 fs/nfs/file.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6-git2/fs/nfs/file.c
===================================================================
--- linux-2.6-git2.orig/fs/nfs/file.c	2006-12-13 12:54:55.000000000 +0100
+++ linux-2.6-git2/fs/nfs/file.c	2006-12-13 12:55:12.000000000 +0100
@@ -321,7 +321,7 @@ static int nfs_release_page(struct page 
 	if (!(gfp & __GFP_FS))
 		return 0;
 	/* Hack... Force nfs_wb_page() to write out the page */
-	SetPageDirty(page);
+	set_page_dirty(page);
 	return !nfs_wb_page(page->mapping->host, page);
 }
 



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-12-14 14:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-13 12:12 [PATCH] nfs: fix NR_FILE_DIRTY underflow Peter Zijlstra
2006-12-13 12:26 ` Trond Myklebust
2006-12-13 15:01   ` Peter Zijlstra
2006-12-13 17:40     ` Trond Myklebust
2006-12-13 18:48       ` Peter Zijlstra
2006-12-14  1:29         ` Andrew Morton
2006-12-14  1:41           ` Andrew Morton
2006-12-14 14:52             ` Trond Myklebust
2006-12-13 16:22   ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox