Re: [PATCH v2 2/5] hugetlb: Move vm_struct declaration to the top of hugetlb_fault()

From: Matthew Wilcox
Date: Wed Feb 21 2024 - 22:35:56 EST


On Wed, Feb 21, 2024 at 03:47:29PM -0800, Vishal Moola (Oracle) wrote:
> hugetlb_fault() currently defines a vm_struct to pass to the generic

s/vm_struct/vm_fault/ (both this line and Subject:)

> handle_userfault() function. We can move this definition to the top of
> hugetlb_fault() so that it can be used throughout the rest of the
> hugetlb fault path.
>
> This will help cleanup a number of excess variables and function
> arguments throughout the stack. Also, since vm_fault already has space
> to store the page offset, use that instead and get rid of idx.
>
> Signed-off-by: Vishal Moola (Oracle) <vishal.moola@xxxxxxxxx>

Reviewed-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>