Re: [PATCH v2 06/11] hugetlb: make hugetlb_fault_mutex_hash() to take PAGE_SIZE index

From: Matthew Wilcox

Date: Wed Jun 17 2026 - 23:17:58 EST


On Wed, Jun 17, 2026 at 11:25:27AM -0600, Jane Chu wrote:
> Make hugetlb_fault_mutex_hash() to take a PAGE_SIZE-based index.
> This makes the helper interface consistent with filemap_get_folio(),
> and linear_page_index(), while preserving the same lock selection for
> a given hugetlb file offset.

Oh, hah.

I don't know that there's a better way to do this than the way you've
done it. Unless we can just remove the fault mutex hash and use the
invalidate_lock instead.