diff options
author | Joonsoo Kim <iamjoonsoo.kim@lge.com> | 2014-01-21 18:51:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-21 19:19:49 -0500 |
commit | 59c82b70dcd9cc273c21fae5abc29e41fc732a17 (patch) | |
tree | 9d661f52eb6ba728be3ec926807088e7886da92c /mm/memory-failure.c | |
parent | 32665f2bbfed2e325d37236d9b0071a11a69124e (diff) |
mm/migrate: remove putback_lru_pages, fix comment on putback_movable_pages
Some part of putback_lru_pages() and putback_movable_pages() is
duplicated, so it could confuse us what we should use. We can remove
putback_lru_pages() since it is not really needed now. This makes us
undestand and maintain the code more easily.
And comment on putback_movable_pages() is stale now, so fix it.
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Reviewed-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Rafael Aquini <aquini@redhat.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Rik van Riel <riel@redhat.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memory-failure.c')
-rw-r--r-- | mm/memory-failure.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 9fa6586d5275..b25ed321e667 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c | |||
@@ -1585,7 +1585,13 @@ static int __soft_offline_page(struct page *page, int flags) | |||
1585 | ret = migrate_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL, | 1585 | ret = migrate_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL, |
1586 | MIGRATE_SYNC, MR_MEMORY_FAILURE); | 1586 | MIGRATE_SYNC, MR_MEMORY_FAILURE); |
1587 | if (ret) { | 1587 | if (ret) { |
1588 | putback_lru_pages(&pagelist); | 1588 | if (!list_empty(&pagelist)) { |
1589 | list_del(&page->lru); | ||
1590 | dec_zone_page_state(page, NR_ISOLATED_ANON + | ||
1591 | page_is_file_cache(page)); | ||
1592 | putback_lru_page(page); | ||
1593 | } | ||
1594 | |||
1589 | pr_info("soft offline: %#lx: migration failed %d, type %lx\n", | 1595 | pr_info("soft offline: %#lx: migration failed %d, type %lx\n", |
1590 | pfn, ret, page->flags); | 1596 | pfn, ret, page->flags); |
1591 | if (ret > 0) | 1597 | if (ret > 0) |