Commit 61c41823 authored by Andreas Herrmann's avatar Andreas Herrmann Committed by
Browse files

[SCSI] zfcp: fix: avoid race between fc_remote_port_add and scsi_add_device



Flush workqueue of a scsi host after a remote port for that host
is registered at the fc transport class. Otherwise immediate
registration of a scsi device on that host is racy.
Signed-off-by: default avatarAndreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent ed829ad6
......@@ -3415,6 +3415,8 @@ zfcp_erp_action_cleanup(int action, struct zfcp_adapter *adapter,
"(adapter %s, wwpn=0x%016Lx)\n",
zfcp_get_busid_by_port(port),
port->wwpn);
else
scsi_flush_work(adapter->scsi_host);
}
zfcp_port_put(port);
break;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment