mm/page-writeback.c: fix __set_page_dirty_no_writeback() return value
authorBob Liu <[email protected]>
Thu, 13 Jan 2011 23:45:49 +0000 (15:45 -0800)
committerLinus Torvalds <[email protected]>
Fri, 14 Jan 2011 01:32:32 +0000 (17:32 -0800)
__set_page_dirty_no_writeback() should return true if it actually
transitioned the page from a clean to dirty state although it seems nobody
uses its return value at present.

Signed-off-by: Bob Liu <[email protected]>
Acked-by: Wu Fengguang <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/page-writeback.c

index b5d8a1f820a02f3bf841a6b655643f61adbeedc2..28763b8bdbddd9caba1478cc9e8aa205a02cf397 100644 (file)
@@ -1103,7 +1103,7 @@ EXPORT_SYMBOL(write_one_page);
 int __set_page_dirty_no_writeback(struct page *page)
 {
        if (!PageDirty(page))
-               SetPageDirty(page);
+               return !TestSetPageDirty(page);
        return 0;
 }