[PATCH 2/2] clean up set_page_dirty()

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

 



Use TestSetPageDirty() to clean up set_page_dirty().

Signed-off-by: Bob Liu <lliubbo@xxxxxxxxx>
---
 mm/page-writeback.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index e8f5f06..da86224 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -1268,11 +1268,8 @@ int set_page_dirty(struct page *page)
 #endif
 		return (*spd)(page);
 	}
-	if (!PageDirty(page)) {
-		if (!TestSetPageDirty(page))
-			return 1;
-	}
-	return 0;
+
+	return !TestSetPageDirty(page);
 }
 EXPORT_SYMBOL(set_page_dirty);
 
-- 
1.6.3.3

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  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@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]