hugetlb: update vma flag check for hugetlb vma lock
[platform/kernel/linux-starfive.git] / mm / hugetlb.c
index 92b3fd0..ed1ac2d 100644 (file)
@@ -262,8 +262,7 @@ static inline struct hugepage_subpool *subpool_vma(struct vm_area_struct *vma)
  */
 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)