On Thu, Jan 27, 2022 at 08:40:50PM +0800, Shiyang Ruan wrote: > +void dax_register_holder(struct dax_device *dax_dev, void *holder, > + const struct dax_holder_operations *ops) > +{ > + if (!dax_alive(dax_dev)) > + return; > + > + dax_dev->holder_data = holder; > + dax_dev->holder_ops = ops; This needs to return an error if there is another holder already. And some kind of locking to prevent concurrent registrations. Also please add kerneldoc comments for the new exported functions. > +void *dax_get_holder(struct dax_device *dax_dev) > +{ > + if (!dax_alive(dax_dev)) > + return NULL; > + > + return dax_dev->holder_data; > +} > +EXPORT_SYMBOL_GPL(dax_get_holder); get tends to imply getting a reference. Maybe just dax_holder()? That being said I can't see where we'd even want to use the holder outside of this file.