Re: [PATCH v2 26/33] mm/vma: update vma_shrink() to not pass start, pgoff parameters

From: Gregory Price

Date: Fri Jul 10 2026 - 17:28:25 EST


On Fri, Jul 10, 2026 at 09:17:07PM +0100, 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>

Carry over from v1

Reviewed-by: Gregory Price <gourry@xxxxxxxxxx>