diff --git a/mm/vmscan.c b/mm/vmscan.c index c35b82a3069d..ac386422bc91 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -4461,8 +4461,8 @@ bool lru_gen_look_around(struct page_vma_mapped_walk *pvmw, unsigned int nr) if (spin_is_contended(pvmw->ptl)) return true; - /* exclude special VMAs containing anon pages from COW */ - if (vma->vm_flags & VM_SPECIAL) + /* exclude non-mm-backed VMAs containing anon pages from COW */ + if (!vma_is_mm_backed(vma)) return true; /* avoid taking the LRU lock under the PTL when possible */