The patch titled Subject: hugetlb: update vma flag check for hugetlb vma lock has been added to the -mm mm-unstable branch. Its filename is hugetlb-update-vma-flag-check-for-hugetlb-vma-lock.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/hugetlb-update-vma-flag-check-for-hugetlb-vma-lock.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Mike Kravetz <mike.kravetz@xxxxxxxxxx> Subject: hugetlb: update vma flag check for hugetlb vma lock Date: Mon, 12 Dec 2022 15:50:42 -0800 The check for whether a hugetlb vma lock exists partially depends on the vma's flags. Currently, it checks for either VM_MAYSHARE or VM_SHARED. The reason both flags are used is because VM_MAYSHARE was previously cleared in hugetlb vmas as they are tore down. This is no longer the case, and only the VM_MAYSHARE check is required. Link: https://lkml.kernel.org/r/20221212235042.178355-2-mike.kravetz@xxxxxxxxxx Signed-off-by: Mike Kravetz <mike.kravetz@xxxxxxxxxx> Cc: "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxxxxxxxxxx> Cc: David Hildenbrand <david@xxxxxxxxxx> Cc: James Houghton <jthoughton@xxxxxxxxxx> Cc: Miaohe Lin <linmiaohe@xxxxxxxxxx> Cc: Mina Almasry <almasrymina@xxxxxxxxxx> Cc: Muchun Song <songmuchun@xxxxxxxxxxxxx> Cc: Naoya Horiguchi <naoya.horiguchi@xxxxxxxxx> Cc: Peter Xu <peterx@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/hugetlb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/mm/hugetlb.c~hugetlb-update-vma-flag-check-for-hugetlb-vma-lock +++ a/mm/hugetlb.c @@ -260,8 +260,7 @@ static inline struct hugepage_subpool *s */ static bool __vma_shareable_lock(struct vm_area_struct *vma) { - return vma->vm_flags & (VM_MAYSHARE | VM_SHARED) && - vma->vm_private_data; + return vma->vm_flags & VM_MAYSHARE && vma->vm_private_data; } void hugetlb_vma_lock_read(struct vm_area_struct *vma) _ Patches currently in -mm which might be from mike.kravetz@xxxxxxxxxx are hugetlb-really-allocate-vma-lock-for-all-sharable-vmas.patch hugetlb-update-vma-flag-check-for-hugetlb-vma-lock.patch