hugetlb: use vmf_anon_prepare() instead of anon_vma_prepare()
authorVishal Moola (Oracle) <vishal.moola@gmail.com>
Wed, 21 Feb 2024 23:47:31 +0000 (15:47 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 5 Mar 2024 01:01:15 +0000 (17:01 -0800)
commit9acad7ba3e25d11f4c96df1b7312ae89e6faca5c
tree9f6e6f28947c1f6f78e78a79e3b40f4bd39b2187
parent7dac0ec8fa3f4977d04974e94806dfa8bdac7ed2
hugetlb: use vmf_anon_prepare() instead of anon_vma_prepare()

hugetlb_no_page() and hugetlb_wp() call anon_vma_prepare().  In
preparation for hugetlb to safely handle faults under the VMA lock, use
vmf_anon_prepare() here instead.

Additionally, passing hugetlb_wp() the vm_fault struct from
hugetlb_fault() works toward cleaning up the hugetlb code and function
stack.

Link: https://lkml.kernel.org/r/20240221234732.187629-5-vishal.moola@gmail.com
Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Muchun Song <muchun.song@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hugetlb.c