Commit 213ecb31 authored by Baolin Wang's avatar Baolin Wang Committed by Linus Torvalds

mm: migrate: change to use bool type for 'page_was_mapped'

Change to use bool type for 'page_was_mapped' variable making it more
readable.

Link: https://lkml.kernel.org/r/ce1279df18d2c163998c403e0b5ec6d3f6f90f7a.1629447552.git.baolin.wang@linux.alibaba.comSigned-off-by: default avatarBaolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: default avatarYang Shi <shy828301@gmail.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 68a9843f
...@@ -960,7 +960,7 @@ static int __unmap_and_move(struct page *page, struct page *newpage, ...@@ -960,7 +960,7 @@ static int __unmap_and_move(struct page *page, struct page *newpage,
int force, enum migrate_mode mode) int force, enum migrate_mode mode)
{ {
int rc = -EAGAIN; int rc = -EAGAIN;
int page_was_mapped = 0; bool page_was_mapped = false;
struct anon_vma *anon_vma = NULL; struct anon_vma *anon_vma = NULL;
bool is_lru = !__PageMovable(page); bool is_lru = !__PageMovable(page);
...@@ -1063,7 +1063,7 @@ static int __unmap_and_move(struct page *page, struct page *newpage, ...@@ -1063,7 +1063,7 @@ static int __unmap_and_move(struct page *page, struct page *newpage,
VM_BUG_ON_PAGE(PageAnon(page) && !PageKsm(page) && !anon_vma, VM_BUG_ON_PAGE(PageAnon(page) && !PageKsm(page) && !anon_vma,
page); page);
try_to_migrate(page, 0); try_to_migrate(page, 0);
page_was_mapped = 1; page_was_mapped = true;
} }
if (!page_mapped(page)) if (!page_mapped(page))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment