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

Christoph Hellwig
2021-02-18T07:06:02Z

> + 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.