Skip to contentSkip to conversation

handle BIO allocation failures in swap_writepage()

PATCH In review Andrew Morton 1 participant 1 message Jul 4, 2002

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/27 handle BIO allocation failures in swap_writepage()

If allocation of a BIO for swap writeout fails, mark the page dirty again to save it from eviction.

 page_io.c |    1 +
 1 files changed, 1 insertion(+)
mm/page_io.c renamed from mm/page_io.c~swap-bio-fail +1 -0
@@ -98,6 +98,7 @@ int swap_writepage(struct page *page)
 	}
 	bio = get_swap_bio(GFP_NOIO, page, end_swap_bio_write);
 	if (bio == NULL) {
+		set_page_dirty(page);
 		ret = -ENOMEM;
 		goto out;
 	}

-