[PATCH 10/17] nvme: switch controller refcounting to use struct device

Sagi Grimberg sagi at grimberg.me
Thu Oct 19 00:17:01 PDT 2017



> -	if (!kref_get_unless_zero(&ctrl->ctrl.kref))
> -		return -EBUSY;
> +	nvme_get_ctrl(&ctrl->ctrl);

Given that we take this reference before we are protected with
the state change I think this should still be get_unless_zero.

Maybe we can introduce get_device_unless_zero() for this?



More information about the Linux-nvme mailing list