Skip to content

Commit

Permalink
mm/gup: add folio to list when folio_isolate_lru() succeed
Browse files Browse the repository at this point in the history
If we call folio_isolate_lru() successfully, we will get return value 0. 
We need to add this folio to the movable_pages_list.

Link: https://lkml.kernel.org/r/20230131063206.28820-1-Kuan-Ying.Lee@mediatek.com
Fixes: 67e139b ("mm/gup.c: refactor check_and_migrate_movable_pages()")
Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Andrew Yang <andrew.yang@mediatek.com>
Cc: Chinwen Chang <chinwen.chang@mediatek.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
Kuan-Ying Lee authored and Andrew Morton committed Feb 1, 2023
1 parent ecaf18b commit a642a85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/gup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1914,7 +1914,7 @@ static unsigned long collect_longterm_unpinnable_pages(
drain_allow = false;
}

if (!folio_isolate_lru(folio))
if (folio_isolate_lru(folio))
continue;

list_add_tail(&folio->lru, movable_page_list);
Expand Down

0 comments on commit a642a85

Please sign in to comment.