Re: [PATCH v3 2/6] mm/sparse-vmemmap: support device DAX in common vmemmap path

From: Lance Yang

Date: Wed Sep 30 2026 - 10:55:17 EST




On 2026/9/30 19:11, Muchun Song wrote:
[...]

Your proposed fix looks correct to me. I would slightly prefer keeping the
rollback close to the failure:

err = sparse_add_section(nid, pfn, cur_nr_pages, altmap,
params->pgmap);
if (err) {
__remove_pages(start_pfn, pfn - start_pfn, altmap,
params->pgmap);
break;
}


Cool. Will shamelessly steal this approach :D

If the first section fails, this simply calls __remove_pages() with an
empty range, which is a harmless no-op.

Would you mind sending this as a separate bug fix? I will ACK it.

Certainly! Lance