[PATCH] nvmet: don't change model_number on live subsys

Christoph Hellwig hch at lst.de
Thu Feb 18 02:05:13 EST 2021


> +	mutex_lock(&subsys->lock);
> +	list_for_each_entry(ctrl, &subsys->ctrls, subsys_entry) {
> +		connected = true;
> +		break;
> +	}
> +	mutex_unlock(&subsys->lock);

This could just use list_empty.  But we'd also need to hold the lock
over the actual change of the model number to avoid a race window.



More information about the Linux-nvme mailing list