On Thu, Oct 28, 2021 at 05:10:17PM +0200, Christoph Hellwig wrote: > No driver is left using the external pgmap refcount, so remove the > code to support it. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> Acked-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx> > diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c > index 50cdde3e9a8b2..316fd2f44df45 100644 > --- a/drivers/pci/p2pdma.c > +++ b/drivers/pci/p2pdma.c > @@ -219,7 +219,7 @@ int pci_p2pdma_add_resource(struct pci_dev *pdev, int bar, size_t size, > error = gen_pool_add_owner(p2pdma->pool, (unsigned long)addr, > pci_bus_address(pdev, bar) + offset, > range_len(&pgmap->range), dev_to_node(&pdev->dev), > - pgmap->ref); > + &pgmap->ref); I assume the change above is safe because of the one below. > struct dev_pagemap { > struct vmem_altmap altmap; > - struct percpu_ref *ref; > - struct percpu_ref internal_ref; > + struct percpu_ref ref;