[PATCH] mm: vmscan: try to free orphaned page

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

 



If the orphaned page has no buffer attached at the moment, we clean it up by
hand, then it has the chance to progress the freeing trip.

Signed-off-by: Hillf Danton <dhillf@xxxxxxxxx>
---

--- a/mm/vmscan.c	Sun Dec  4 13:10:08 2011
+++ b/mm/vmscan.c	Mon Dec 12 20:12:44 2011
@@ -487,12 +487,10 @@ static pageout_t pageout(struct page *pa
 		 * Some data journaling orphaned pages can have
 		 * page->mapping == NULL while being dirty with clean buffers.
 		 */
-		if (page_has_private(page)) {
-			if (try_to_free_buffers(page)) {
-				ClearPageDirty(page);
-				printk("%s: orphaned page\n", __func__);
-				return PAGE_CLEAN;
-			}
+		if (!page_has_private(page) || try_to_free_buffers(page)) {
+			ClearPageDirty(page);
+			printk(KERN_INFO "%s: orphaned page\n", __func__);
+			return PAGE_CLEAN;
 		}
 		return PAGE_KEEP;
 	}

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.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]