]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] handle BIO allocation failures in swap_writepage()
authorAndrew Morton <akpm@zip.com.au>
Thu, 4 Jul 2002 15:29:59 +0000 (08:29 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Thu, 4 Jul 2002 15:29:59 +0000 (08:29 -0700)
If allocation of a BIO for swap writeout fails, mark the page dirty
again to save it from eviction.

mm/page_io.c

index 3692ead4d94cb04c4ea87b4de175f117c80a4f3d..b89925ee30ea3cd0e0ed969eaa10de7f9060cc10 100644 (file)
@@ -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;
        }