linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] fix __set_page_dirty_no_writeback() return value
@ 2010-11-10  9:00 Bob Liu
  2010-11-10  9:00 ` [PATCH 2/2] clean up set_page_dirty() Bob Liu
  2010-11-10 21:01 ` [PATCH 1/2] fix __set_page_dirty_no_writeback() return value Andrew Morton
  0 siblings, 2 replies; 5+ messages in thread
From: Bob Liu @ 2010-11-10  9:00 UTC (permalink / raw)
  To: akpm; +Cc: fengguang.wu, linux-mm, kenchen, Bob Liu

__set_page_dirty_no_writeback() should return true if it actually transitioned
the page from a clean to dirty state although it seems nobody used its return
value now.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
---
 mm/page-writeback.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index bf85062..e8f5f06 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -1157,9 +1157,7 @@ EXPORT_SYMBOL(write_one_page);
  */
 int __set_page_dirty_no_writeback(struct page *page)
 {
-	if (!PageDirty(page))
-		SetPageDirty(page);
-	return 0;
+	return !TestSetPageDirty(page);
 }
 
 /*
-- 
1.6.3.3

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2010-11-14 12:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-10  9:00 [PATCH 1/2] fix __set_page_dirty_no_writeback() return value Bob Liu
2010-11-10  9:00 ` [PATCH 2/2] clean up set_page_dirty() Bob Liu
2010-11-10 21:04   ` Andrew Morton
2010-11-14 12:05   ` Michel Lespinasse
2010-11-10 21:01 ` [PATCH 1/2] fix __set_page_dirty_no_writeback() return value Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).