aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Bulwahn <lukas.bulwahn@gmail.com>2024-01-22 10:25:04 +0100
committerAndrew Morton <akpm@linux-foundation.org>2024-02-22 10:24:39 -0800
commit3efbe13e361acfd163fd1a2466e4fb9bed7dc1b0 (patch)
tree44aa077f20403acfe1d408f97a1bd0b5a366a03e
parent8689d750006bbd811423dd41ed5efcd8a029862c (diff)
downloadlinux-3efbe13e361acfd163fd1a2466e4fb9bed7dc1b0.tar.gz
mempolicy: clean up minor dead code in queue_pages_test_walk()
Commit 2cafb582173f ("mempolicy: remove confusing MPOL_MF_LAZY dead code") removes MPOL_MF_LAZY handling in queue_pages_test_walk(), and with that, there is no effective use of the local variable endvma in that function remaining. Remove the local variable endvma and its dead code. No functional change. This issue was identified with clang-analyzer's dead stores analysis. Link: https://lkml.kernel.org/r/20240122092504.18377-1-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--mm/mempolicy.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 10a590ee1c899..5e519163c4dcb 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -654,7 +654,6 @@ static int queue_pages_test_walk(unsigned long start, unsigned long end,
{
struct vm_area_struct *next, *vma = walk->vma;
struct queue_pages *qp = walk->private;
- unsigned long endvma = vma->vm_end;
unsigned long flags = qp->flags;
/* range check first */
@@ -682,9 +681,6 @@ static int queue_pages_test_walk(unsigned long start, unsigned long end,
!(flags & MPOL_MF_STRICT))
return 1;
- if (endvma > end)
- endvma = end;
-
/*
* Check page nodes, and queue pages to move, in the current vma.
* But if no moving, and no strict checking, the scan can be skipped.