return NULL;
if (is_zero_pfn(pfn))
return NULL;
+ /*
+ * NOTE: New users of ZONE_DEVICE will not set pte_devmap() and
+ * will have refcounts incremented on their struct pages when
+ * they are inserted into PTEs, thus they are safe to return
+ * here. Legacy ZONE_DEVICE pages that set pte_devmap() do not
+ * have refcounts. Example of legacy ZONE_DEVICE is
+ * MEMORY_DEVICE_FS_DAX type in pmem or virtio_fs drivers.
+ */
if (pte_devmap(pte))
-/*
- * NOTE: New uers of ZONE_DEVICE will not set pte_devmap() and will have
- * refcounts incremented on their struct pages when they are inserted into
- * PTEs, thus they are safe to return here. Legacy ZONE_DEVICE pages that set
- * pte_devmap() do not have refcounts. Example of legacy ZONE_DEVICE is
- * MEMORY_DEVICE_FS_DAX type in pmem or virtio_fs drivers.
- */
return NULL;
print_bad_pte(vma, addr, pte, NULL);