fs: hugetlbfs: set vma policy only when needed for allocating folio
authorAckerley Tng <ackerleytng@google.com>
Tue, 2 May 2023 23:56:22 +0000 (23:56 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 9 Jun 2023 23:25:17 +0000 (16:25 -0700)
commitadef080382637f207c68e8ad633481d9b9332b63
tree0a0db08f206a56058a6e8b43978250d918b7d563
parent88537aac0b3840314d3a5cc401a7fc400c069bc9
fs: hugetlbfs: set vma policy only when needed for allocating folio

Calling hugetlb_set_vma_policy() later avoids setting the vma policy
and then dropping it on a page cache hit.

Link: https://lkml.kernel.org/r/20230502235622.3652586-1-ackerleytng@google.com
Signed-off-by: Ackerley Tng <ackerleytng@google.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Cc: Vishal Annapurve <vannapurve@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/hugetlbfs/inode.c