On Wed, Jul 14, 2021 at 12:36 PM Joao Martins <joao.m.martins@xxxxxxxxxx> wrote: > > Right now, only static dax regions have a valid @pgmap pointer in its > struct dev_dax. Dynamic dax case however, do not. > > In preparation for device-dax compound pagemap support, make sure that > dev_dax pgmap field is set after it has been allocated and initialized. I think this is ok to fold into the patch that needs it. > > Suggested-by: Dan Williams <dan.j.williams@xxxxxxxxx> > Signed-off-by: Joao Martins <joao.m.martins@xxxxxxxxxx> > --- > drivers/dax/device.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/dax/device.c b/drivers/dax/device.c > index 0b82159b3564..6e348b5f9d45 100644 > --- a/drivers/dax/device.c > +++ b/drivers/dax/device.c > @@ -426,6 +426,8 @@ int dev_dax_probe(struct dev_dax *dev_dax) > } > > pgmap->type = MEMORY_DEVICE_GENERIC; > + dev_dax->pgmap = pgmap; > + > addr = devm_memremap_pages(dev, pgmap); > if (IS_ERR(addr)) > return PTR_ERR(addr); > -- > 2.17.1 >