linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: vmscan: try to free orphaned page
@ 2011-12-12 12:24 Hillf Danton
  2011-12-12 23:12 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Hillf Danton @ 2011-12-12 12:24 UTC (permalink / raw)
  To: Hugh Dickins
  Cc: David Rientjes, KAMEZAWA Hiroyuki, Andrea Arcangeli,
	Andrew Morton, linux-mm, LKML

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@gmail.com>
---

--- 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@kvack.org.  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@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2011-12-12 23:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-12 12:24 [PATCH] mm: vmscan: try to free orphaned page Hillf Danton
2011-12-12 23:12 ` Andrew Morton

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