diff options
author | Andrea Arcangeli <aarcange@redhat.com> | 2011-02-01 18:52:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-02-02 19:03:18 -0500 |
commit | 57fc4a5ee322cde96c33f101d3c2d3b79011c05c (patch) | |
tree | dc0fbf22dc90c93690de7cf0d115e5499222ff04 /mm/memory-failure.c | |
parent | 552b372ba9db85751e7db2998f07cca2e51f5865 (diff) |
mm: when migrate_pages returns 0, all pages must have been released
In some cases migrate_pages could return zero while still leaving a few
pages in the pagelist (and some caller wouldn't notice it has to call
putback_lru_pages after commit cf608ac19c9 ("mm: compaction: fix
COMPACTPAGEFAILED counting")).
Add one missing putback_lru_pages not added by commit cf608ac19c95 ("mm:
compaction: fix COMPACTPAGEFAILED counting").
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Cc: Christoph Lameter <cl@linux.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
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 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 548fbd70f026..75398b0bfede 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c | |||
@@ -1419,6 +1419,7 @@ int soft_offline_page(struct page *page, int flags) | |||
1419 | ret = migrate_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL, | 1419 | ret = migrate_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL, |
1420 | 0, true); | 1420 | 0, true); |
1421 | if (ret) { | 1421 | if (ret) { |
1422 | putback_lru_pages(&pagelist); | ||
1422 | pr_info("soft offline: %#lx: migration failed %d, type %lx\n", | 1423 | pr_info("soft offline: %#lx: migration failed %d, type %lx\n", |
1423 | pfn, ret, page->flags); | 1424 | pfn, ret, page->flags); |
1424 | if (ret > 0) | 1425 | if (ret > 0) |