提交 e4e9ba5d 编写于 作者: S Swen Schillig 提交者: James Bottomley

[SCSI] zfcp: prevent fc_remote_port_delete calls for unregistered rport

In case of an adapter reopen all rports have to be deleted from the
environment. This should only happen for already registered rports
otherwise fc_remote_port_delete is called with a NULL pointer.
Signed-off-by: NSwen Schillig <swen@vnet.ibm.com>
Signed-off-by: NChristof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
上级 b7f15f3c
......@@ -1236,6 +1236,8 @@ static void zfcp_erp_rports_del(struct zfcp_adapter *adapter)
{
struct zfcp_port *port;
list_for_each_entry(port, &adapter->port_list_head, list) {
if (!port->rport)
continue;
fc_remote_port_delete(port->rport);
port->rport = NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册