On 07/24/2015 05:21 PM, Christoph Hellwig wrote:
>> + char work_q_name[264];
>
> create_workqueue and friends now accept printf-like format
> string, so there is no need for this temporary buffer.
>
>> + int error;
>> + struct completion init_complete;
>
> Please rename error to init_error and only assign to it before calling
> complete().
>
> Also I'm not sure what the real point of init_complete is, shouldn't
> we just have a mutex held in alua_initialize and alua_activate to
> synchronize the two against each other?
>
Hmm. I guess I could; I'll check here.
>> + rcu_read_lock();
>> + pg = rcu_dereference(h->pg);
>> + if (pg) {
>> + kref_get(&pg->kref);
>> + rcu_read_unlock();
>> + alua_rtpg_queue(pg, sdev, NULL);
>> + kref_put(&pg->kref, release_port_group);
>> + } else
>> + rcu_read_unlock();
>> +}
>
> How about:
>
> rcu_read_lock();
> pg = rcu_dereference(h->pg);
> if (!pg) {
> rcu_read_unlock();
> return;
> }
>
> kref_get(&pg->kref);
> rcu_read_unlock();
> alua_rtpg_queue(pg, sdev, NULL);
> kref_put(&pg->kref, release_port_group);
>
Ok.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
[email protected] +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html