From: Daisuke Nishimura Remove redundant mapping check. We'd be doing exactly what putback_lru_page() is doing. So, this code as always unnecessary, duplicate code. So, just let putback_lru_page() handle this condition and conditionally unlock_page(). Signed-off-by: Daisuke Nishimura Signed-off-by: KOSAKI Motohiro Acked-by: Lee Schermerhorn Cc: Rik van Riel Signed-off-by: Andrew Morton --- mm/migrate.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff -puN mm/migrate.c~unevictable-lru-infrastructure-remove-redundant-page-mapping-check mm/migrate.c --- a/mm/migrate.c~unevictable-lru-infrastructure-remove-redundant-page-mapping-check +++ a/mm/migrate.c @@ -728,13 +728,7 @@ unlock: * restored. */ list_del(&page->lru); - if (!page->mapping) { - VM_BUG_ON(page_count(page) != 1); - unlock_page(page); - put_page(page); /* just free the old page */ - goto end_migration; - } else - unlock = putback_lru_page(page); + unlock = putback_lru_page(page); } if (unlock) _