]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm-handling-non-lru-pages-returned-by-vm_normal_pages-fix
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 31 May 2022 17:27:42 +0000 (10:27 -0700)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 20 Jul 2022 00:15:01 +0000 (20:15 -0400)
adjust comment positioning, fix typo

Cc: Alex Sierra <alex.sierra@amd.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memory.c

index c905fabddeec8d424d458a16b334c34d97c990dd..cc3c8ed45d15bda1c5afd1b6c635f12ef7d93056 100644 (file)
@@ -632,14 +632,15 @@ struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr,
                        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);