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@xxxxxxxxx> --- mm/mlock.c | 2 -- 1 file changed, 2 deletions(-) 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) { -- 2.33.1