diff options
Diffstat (limited to 'mm/migrate.c')
-rw-r--r-- | mm/migrate.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/mm/migrate.c b/mm/migrate.c index d168aec98427..c7d550011a64 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
@@ -1489,18 +1489,21 @@ int migrate_misplaced_page(struct page *page, int node) | |||
1489 | } | 1489 | } |
1490 | isolated = 1; | 1490 | isolated = 1; |
1491 | 1491 | ||
1492 | /* | ||
1493 | * Page is isolated which takes a reference count so now the | ||
1494 | * callers reference can be safely dropped without the page | ||
1495 | * disappearing underneath us during migration | ||
1496 | */ | ||
1497 | put_page(page); | ||
1498 | |||
1499 | page_lru = page_is_file_cache(page); | 1492 | page_lru = page_is_file_cache(page); |
1500 | inc_zone_page_state(page, NR_ISOLATED_ANON + page_lru); | 1493 | inc_zone_page_state(page, NR_ISOLATED_ANON + page_lru); |
1501 | list_add(&page->lru, &migratepages); | 1494 | list_add(&page->lru, &migratepages); |
1502 | } | 1495 | } |
1503 | 1496 | ||
1497 | /* | ||
1498 | * Page is either isolated or there is not enough space on the target | ||
1499 | * node. If isolated, then it has taken a reference count and the | ||
1500 | * callers reference can be safely dropped without the page | ||
1501 | * disappearing underneath us during migration. Otherwise the page is | ||
1502 | * not to be migrated but the callers reference should still be | ||
1503 | * dropped so it does not leak. | ||
1504 | */ | ||
1505 | put_page(page); | ||
1506 | |||
1504 | if (isolated) { | 1507 | if (isolated) { |
1505 | int nr_remaining; | 1508 | int nr_remaining; |
1506 | 1509 | ||