+/* Suppress the vma that needs writeback since we can not track dirtyIIUC a second but anonymous memory needs writeback too, just to swap.
+ * pages now.
+ */
+static bool vma_can_vmap(struct vm_area_struct *vma)
+{
+ return vma_is_anonymous(vma) || is_vm_hugetlb_page(vma) ||
+ vma_is_shmem(vma);
+}
+
I'm not an MM person so I might be off.