Commit bf90ac19 authored by Wang Qing's avatar Wang Qing Committed by Linus Torvalds

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.comSigned-off-by: default avatarWang Qing <wangqing@vivo.com>
Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9317d0ff
...@@ -4098,7 +4098,6 @@ static vm_fault_t do_numa_page(struct vm_fault *vmf) ...@@ -4098,7 +4098,6 @@ static vm_fault_t do_numa_page(struct vm_fault *vmf)
int page_nid = NUMA_NO_NODE; int page_nid = NUMA_NO_NODE;
int last_cpupid; int last_cpupid;
int target_nid; int target_nid;
bool migrated = false;
pte_t pte, old_pte; pte_t pte, old_pte;
bool was_writable = pte_savedwrite(vmf->orig_pte); bool was_writable = pte_savedwrite(vmf->orig_pte);
int flags = 0; int flags = 0;
...@@ -4168,8 +4167,7 @@ static vm_fault_t do_numa_page(struct vm_fault *vmf) ...@@ -4168,8 +4167,7 @@ static vm_fault_t do_numa_page(struct vm_fault *vmf)
} }
/* Migrate to the requested node */ /* Migrate to the requested node */
migrated = migrate_misplaced_page(page, vma, target_nid); if (migrate_misplaced_page(page, vma, target_nid)) {
if (migrated) {
page_nid = target_nid; page_nid = target_nid;
flags |= TNF_MIGRATED; flags |= TNF_MIGRATED;
} else } else
......
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