[PATCH v2] nvme: stop aer posting if controller state not live

Christoph Hellwig hch at infradead.org
Fri Sep 15 08:43:39 PDT 2017


> +	bool done = true, live = true;
> +
> +	spin_lock_irq(&ctrl->lock);
> +	if (unlikely(ctrl->state != NVME_CTRL_LIVE))
> +		live = false;
> +	spin_unlock_irq(&ctrl->lock);

Taking a lock isn't going to help us anything when reading a single
value.  But I can just remove it when applying, the rest of the patch
looks good to me.



More information about the Linux-nvme mailing list