aboutsummaryrefslogtreecommitdiffstats
path: root/mm/migrate.c
diff options
context:
space:
mode:
authorAndrea Arcangeli <aarcange@redhat.com>2011-02-01 18:52:32 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-02-02 19:03:18 -0500
commit57fc4a5ee322cde96c33f101d3c2d3b79011c05c (patch)
treedc0fbf22dc90c93690de7cf0d115e5499222ff04 /mm/migrate.c
parent552b372ba9db85751e7db2998f07cca2e51f5865 (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/migrate.c')
-rw-r--r--mm/migrate.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index 9f29a3b7aac..155a2e9a805 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -772,6 +772,7 @@ uncharge:
772unlock: 772unlock:
773 unlock_page(page); 773 unlock_page(page);
774 774
775move_newpage:
775 if (rc != -EAGAIN) { 776 if (rc != -EAGAIN) {
776 /* 777 /*
777 * A page that has been migrated has all references 778 * A page that has been migrated has all references
@@ -785,8 +786,6 @@ unlock:
785 putback_lru_page(page); 786 putback_lru_page(page);
786 } 787 }
787 788
788move_newpage:
789
790 /* 789 /*
791 * Move the new page to the LRU. If migration was not successful 790 * Move the new page to the LRU. If migration was not successful
792 * then this will free the page. 791 * then this will free the page.