Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17a093ef authored by Swen Schillig's avatar Swen Schillig Committed by James Bottomley
Browse files

[SCSI] zfcp: avoid double notify in lowmem scenario



In a LOWMEM condition an ERP notification would have been sent twice
causing an unpredictable behaviour of the ERP.

Signed-off-by: default avatarSwen Schillig <swen@vnet.ibm.com>
Signed-off-by: default avatarChristof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 379d6bf6
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -848,11 +848,17 @@ void zfcp_erp_port_strategy_open_lookup(struct work_struct *work)
					      gid_pn_work);

	retval = zfcp_fc_ns_gid_pn(&port->erp_action);
	if (retval == -ENOMEM)
		zfcp_erp_notify(&port->erp_action, ZFCP_STATUS_ERP_LOWMEM);
	if (!retval) {
		port->erp_action.step = ZFCP_ERP_STEP_NAMESERVER_LOOKUP;
	if (retval)
		goto out;
	}
	if (retval == -ENOMEM) {
		zfcp_erp_notify(&port->erp_action, ZFCP_STATUS_ERP_LOWMEM);
		goto out;
	}
	/* all other error condtions */
	zfcp_erp_notify(&port->erp_action, 0);
out:
	zfcp_port_put(port);
}