diff options
author | Peter Xu <peterx@redhat.com> | 2022-11-30 10:33:44 -0500 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-12-01 15:48:45 -0800 |
commit | 4dadd4e4292aabb5f2614b7920e989a36605a1b9 (patch) | |
tree | 56c58e9390f42ee3a5c48517fd5b2a0a5010e3e9 | |
parent | 8df0fb05e7431221696881a2304e0ce6841ab9c5 (diff) | |
download | linux-4dadd4e4292aabb5f2614b7920e989a36605a1b9.tar.gz linux-4dadd4e4292aabb5f2614b7920e989a36605a1b9.tar.xz |
mm-hugetlb-introduce-hugetlb_walk-fix
fix build with CONFIG_HUGETLB_PAGE=n, CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y
Link: https://lkml.kernel.org/r/Y4d4qh0ACmo455Nj@x1n
Signed-off-by: Peter Xu <peterx@redhat.com>
Reported-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | include/linux/hugetlb.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 1a51c45fdf2e..ec2a1f93b12d 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -1248,7 +1248,8 @@ __vma_shareable_flags_pmd(struct vm_area_struct *vma) static inline pte_t * hugetlb_walk(struct vm_area_struct *vma, unsigned long addr, unsigned long sz) { -#if defined(CONFIG_ARCH_WANT_HUGE_PMD_SHARE) && defined(CONFIG_LOCKDEP) +#if defined(CONFIG_HUGETLB_PAGE) && \ + defined(CONFIG_ARCH_WANT_HUGE_PMD_SHARE) && defined(CONFIG_LOCKDEP) struct hugetlb_vma_lock *vma_lock = vma->vm_private_data; /* |