Re: [PATCH V9 6/8] dax: Add dax_set_ops() for setting dax_operations at bind time

From: Jonathan Cameron

Date: Tue Mar 24 2026 - 10:59:48 EST


On Tue, 24 Mar 2026 00:39:16 +0000
John Groves <john@xxxxxxxxxxxxxx> wrote:

> From: John Groves <John@xxxxxxxxxx>
>
> Add a new dax_set_ops() function that allows drivers to set the
> dax_operations after the dax_device has been allocated. This is needed
> for fsdev_dax where the operations need to be set during probe and
> cleared during unbind.
>
> The fsdev driver uses devm_add_action_or_reset() for cleanup consistency,
> avoiding the complexity of mixing devm-managed resources with manual
> cleanup in a remove() callback. This ensures cleanup happens automatically
> in the correct reverse order when the device is unbound.
>
> Reviewed-by: Dave Jiang <dave.jiang@xxxxxxxxx>
> Signed-off-by: John Groves <john@xxxxxxxxxx>
Reviewed-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxx>