Skip to content

Commit 213ecb3

Browse files
Baolin Wangtorvalds
authored andcommitted
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.com Signed-off-by: Baolin Wang <[email protected]> Reviewed-by: Yang Shi <[email protected]> Cc: Alistair Popple <[email protected]> Cc: Matthew Wilcox <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 68a9843 commit 213ecb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mm/migrate.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ static int __unmap_and_move(struct page *page, struct page *newpage,
960960
int force, enum migrate_mode mode)
961961
{
962962
int rc = -EAGAIN;
963-
int page_was_mapped = 0;
963+
bool page_was_mapped = false;
964964
struct anon_vma *anon_vma = NULL;
965965
bool is_lru = !__PageMovable(page);
966966

@@ -1063,7 +1063,7 @@ static int __unmap_and_move(struct page *page, struct page *newpage,
10631063
VM_BUG_ON_PAGE(PageAnon(page) && !PageKsm(page) && !anon_vma,
10641064
page);
10651065
try_to_migrate(page, 0);
1066-
page_was_mapped = 1;
1066+
page_was_mapped = true;
10671067
}
10681068

10691069
if (!page_mapped(page))

0 commit comments

Comments
 (0)