[PATCH 1/1] nvme/fc: add 'discovery' sysfs attribute to fc transport device
Christoph Hellwig
hch at infradead.org
Tue Nov 7 11:25:28 PST 2017
> + list_for_each_entry(lport, &nvme_fc_lport_list, port_list) {
> + list_for_each_entry_safe(rport, tmp_rport,
> + &lport->endp_list, endp_list) {
> + if (!nvme_fc_rport_get(rport))
> + continue;
> + spin_unlock_irqrestore(&nvme_fc_lock, flags);
> + nvme_fc_signal_discovery_scan(lport, rport);
> + nvme_fc_rport_put(rport);
> + spin_lock_irqsave(&nvme_fc_lock, flags);
> + }
> + }
> + spin_unlock_irqrestore(&nvme_fc_lock, flags);
What guarantees the list next pointers are still valid after
you dropped nvme_fc_lock?
More information about the Linux-nvme
mailing list