diff options
author | xu xin <[email protected]> | 2022-04-29 14:36:58 -0700 |
---|---|---|
committer | akpm <[email protected]> | 2022-04-29 14:36:58 -0700 |
commit | 25fa414adad5b91b54a93f294bf3b17239741858 (patch) | |
tree | 7fc1e782133bbe86fbe172a5ce2543842528595e | |
parent | 30a514002db23fd630e3e52a2bdfb05c0de03378 (diff) |
mm/khugepaged: use vma_is_anonymous
Clean up the vma->vm_ops usage. Use vma_is_anonymous instead of
vma->vm_ops to make it more understandable.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: xu xin <[email protected]>
Reviewed-by: Yang Shi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r-- | mm/khugepaged.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/khugepaged.c b/mm/khugepaged.c index a4e5eaf3eb01..ac53ad2c9bb1 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -466,7 +466,7 @@ static bool hugepage_vma_check(struct vm_area_struct *vma, S_ISREG(inode->i_mode); } - if (!vma->anon_vma || vma->vm_ops) + if (!vma->anon_vma || !vma_is_anonymous(vma)) return false; if (vma_is_temporary_stack(vma)) return false; @@ -972,7 +972,7 @@ static int hugepage_vma_revalidate(struct mm_struct *mm, unsigned long address, if (!hugepage_vma_check(vma, vma->vm_flags)) return SCAN_VMA_CHECK; /* Anon VMA expected */ - if (!vma->anon_vma || vma->vm_ops) + if (!vma->anon_vma || !vma_is_anonymous(vma)) return SCAN_VMA_CHECK; return 0; } |