|
@@ -3233,7 +3233,7 @@ out:
|
|
static int create_huge_pmd(struct mm_struct *mm, struct vm_area_struct *vma,
|
|
static int create_huge_pmd(struct mm_struct *mm, struct vm_area_struct *vma,
|
|
unsigned long address, pmd_t *pmd, unsigned int flags)
|
|
unsigned long address, pmd_t *pmd, unsigned int flags)
|
|
{
|
|
{
|
|
- if (!vma->vm_ops)
|
|
|
|
|
|
+ if (vma_is_anonymous(vma))
|
|
return do_huge_pmd_anonymous_page(mm, vma, address, pmd, flags);
|
|
return do_huge_pmd_anonymous_page(mm, vma, address, pmd, flags);
|
|
if (vma->vm_ops->pmd_fault)
|
|
if (vma->vm_ops->pmd_fault)
|
|
return vma->vm_ops->pmd_fault(vma, address, pmd, flags);
|
|
return vma->vm_ops->pmd_fault(vma, address, pmd, flags);
|
|
@@ -3244,7 +3244,7 @@ static int wp_huge_pmd(struct mm_struct *mm, struct vm_area_struct *vma,
|
|
unsigned long address, pmd_t *pmd, pmd_t orig_pmd,
|
|
unsigned long address, pmd_t *pmd, pmd_t orig_pmd,
|
|
unsigned int flags)
|
|
unsigned int flags)
|
|
{
|
|
{
|
|
- if (!vma->vm_ops)
|
|
|
|
|
|
+ if (vma_is_anonymous(vma))
|
|
return do_huge_pmd_wp_page(mm, vma, address, pmd, orig_pmd);
|
|
return do_huge_pmd_wp_page(mm, vma, address, pmd, orig_pmd);
|
|
if (vma->vm_ops->pmd_fault)
|
|
if (vma->vm_ops->pmd_fault)
|
|
return vma->vm_ops->pmd_fault(vma, address, pmd, flags);
|
|
return vma->vm_ops->pmd_fault(vma, address, pmd, flags);
|