Re: [PATCH v2 26/33] mm/vma: update vma_shrink() to not pass start, pgoff parameters
From: Vlastimil Babka (SUSE)
Date: Thu Jul 16 2026 - 03:49:40 EST
On 7/10/26 22:17, Lorenzo Stoakes wrote:
> vma_shrink() is only used by relocate_vma_down() to shrink the tail of a
> VMA. Therefore neither the start nor the pgoff parameters make any sense.
>
> It seemed we were passing the pgoff parameter solely to satisfy
> vma_set_range()'s requirement for pgoff being specified.
>
> Since vma_set_range() is now isolated to vma.c, we can simply introduce
> __vma_set_range() which sets only vma->vm_[start, end], and invoke this
> instead, removing start and pgoff from vma_shrink() altogether.
>
> No functional change intended.
>
> Reviewed-by: Pedro Falcato <pfalcato@xxxxxxx>
> Signed-off-by: Lorenzo Stoakes <ljs@xxxxxxxxxx>
Reviewed-by: Vlastimil Babka (SUSE) <vbabka@xxxxxxxxxx>