summaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
authorWang Qing <wangqing@vivo.com>2021-04-29 22:57:07 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-04-30 11:20:38 -0700
commitbf90ac198e30d242a12fc550d35b335e462a7632 (patch)
treed50645a7ad72010ac1908a7483a034e9a23de425 /mm/memory.c
parent9317d0fffeb4c3929069cfc7377cfa2a7cd36d1d (diff)
downloadlinux-bf90ac198e30d242a12fc550d35b335e462a7632.tar.gz
linux-bf90ac198e30d242a12fc550d35b335e462a7632.tar.bz2
linux-bf90ac198e30d242a12fc550d35b335e462a7632.zip
mm/memory.c: do_numa_page(): delete bool "migrated"
Smatch gives the warning: do_numa_page() warn: assigning (-11) to unsigned variable 'migrated' Link: https://lkml.kernel.org/r/1614603421-2681-1-git-send-email-wangqing@vivo.com Signed-off-by: Wang Qing <wangqing@vivo.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 3196fa5e7f7d..f95d12032b34 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -4098,7 +4098,6 @@ static vm_fault_t do_numa_page(struct vm_fault *vmf)
int page_nid = NUMA_NO_NODE;
int last_cpupid;
int target_nid;
- bool migrated = false;
pte_t pte, old_pte;
bool was_writable = pte_savedwrite(vmf->orig_pte);
int flags = 0;
@@ -4168,8 +4167,7 @@ static vm_fault_t do_numa_page(struct vm_fault *vmf)
}
/* Migrate to the requested node */
- migrated = migrate_misplaced_page(page, vma, target_nid);
- if (migrated) {
+ if (migrate_misplaced_page(page, vma, target_nid)) {
page_nid = target_nid;
flags |= TNF_MIGRATED;
} else