Message ID | 20220504003958.18402-2-richard.weiyang@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [1/2] mm/mlock: not handle NULL vma specially | expand |
diff --git a/mm/mlock.c b/mm/mlock.c index 0b7cf7d60922..eab3b0a5b569 100644 --- a/mm/mlock.c +++ b/mm/mlock.c @@ -505,8 +505,6 @@ static unsigned long count_mm_mlocked_page_nr(struct mm_struct *mm, mm = current->mm; for (vma = find_vma(mm, start); vma ; vma = vma->vm_next) { - if (start >= vma->vm_end) - continue; if (start + len <= vma->vm_start) break; if (vma->vm_flags & VM_LOCKED) {
We would meet this situation in the loop since: * find_vma() would return a vma meets vm_end > start. * the following vma->vm_end is growing So this situation never happens. Signed-off-by: Wei Yang <richard.weiyang@gmail.com> --- mm/mlock.c | 2 -- 1 file changed, 2 deletions(-)