Merge tag 'dax-fixes-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm

Pull dax fixes from Dan Williams:
"A filesystem-dax and device-dax fix for v5.3.

The filesystem-dax fix is tagged for stable as the implementation has
been mistakenly throwing away all cow pages on any truncate or hole
punch operation as part of the solution to coordinate device-dma vs
truncate to dax pages.

The device-dax change fixes up a regression this cycle from the
introduction of a common 'internal per-cpu-ref' implementation.

Summary:

- Fix dax_layout_busy_page() to not discard private cow pages of
fs/dax private mappings.

- Update the memremap_pages core to properly cleanup on behalf of
internal reference-count users like device-dax"

* tag 'dax-fixes-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
mm/memremap: Fix reuse of pgmap instances with internal references
dax: dax_layout_busy_page() should not unmap cow pages

Changed files
+7 -1
fs
mm
+1 -1
fs/dax.c
··· 600 600 * guaranteed to either see new references or prevent new 601 601 * references from being established. 602 602 */ 603 - unmap_mapping_range(mapping, 0, 0, 1); 603 + unmap_mapping_range(mapping, 0, 0, 0); 604 604 605 605 xas_lock_irq(&xas); 606 606 xas_for_each(&xas, entry, ULONG_MAX) {
+6
mm/memremap.c
··· 91 91 wait_for_completion(&pgmap->done); 92 92 percpu_ref_exit(pgmap->ref); 93 93 } 94 + /* 95 + * Undo the pgmap ref assignment for the internal case as the 96 + * caller may re-enable the same pgmap. 97 + */ 98 + if (pgmap->ref == &pgmap->internal_ref) 99 + pgmap->ref = NULL; 94 100 } 95 101 96 102 static void devm_memremap_pages_release(void *data)