]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/migrate.c
migration: fix writepage error
[linux-2.6-omap-h63xx.git] / mm / migrate.c
index 385db89f0c33e48a421b8adf63e63b60b0e4881e..1e0d6b237f4418c2f8b8ca50e88d85a787adc0a7 100644 (file)
@@ -522,15 +522,12 @@ static int writeout(struct address_space *mapping, struct page *page)
        remove_migration_ptes(page, page);
 
        rc = mapping->a_ops->writepage(page, &wbc);
-       if (rc < 0)
-               /* I/O Error writing */
-               return -EIO;
 
        if (rc != AOP_WRITEPAGE_ACTIVATE)
                /* unlocked. Relock */
                lock_page(page);
 
-       return -EAGAIN;
+       return (rc < 0) ? -EIO : -EAGAIN;
 }
 
 /*