diff options
author | Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com> | 2023-01-31 14:32:06 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-02-22 12:59:54 +0100 |
commit | eaba8521fd2056b0d2ce24538ed5ddc0a0336c72 (patch) | |
tree | be8b6e5997f22c4021b70b0cb2094def703d85bc /mm | |
parent | f16e2f7c52d0b6f46c89090ac92a922c2ee45348 (diff) | |
download | linux-eaba8521fd2056b0d2ce24538ed5ddc0a0336c72.tar.gz |
mm/gup: add folio to list when folio_isolate_lru() succeed
commit aa1e6a932ca652a50a5df458399724a80459f521 upstream. 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: 67e139b02d99 ("mm/gup.c: refactor check_and_migrate_movable_pages()") Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com> Reviewed-by: Alistair Popple <apopple@nvidia.com> Acked-by: David Hildenbrand <david@redhat.com> Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/gup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/gup.c b/mm/gup.c index eb8d7baf9e4d..028f3b4e8c3f 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -1978,7 +1978,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); |