Skip to content

Commit

Permalink
[SCSI] zfcp: avoid double notify in lowmem scenario
Browse files Browse the repository at this point in the history
In a LOWMEM condition an ERP notification would have been sent twice
causing an unpredictable behaviour of the ERP.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
Swen Schillig authored and James Bottomley committed Jul 30, 2009
1 parent 379d6bf commit 17a093e
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions drivers/s390/scsi/zfcp_erp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
if (!retval) {
port->erp_action.step = ZFCP_ERP_STEP_NAMESERVER_LOOKUP;
goto out;
}
if (retval == -ENOMEM) {
zfcp_erp_notify(&port->erp_action, ZFCP_STATUS_ERP_LOWMEM);
port->erp_action.step = ZFCP_ERP_STEP_NAMESERVER_LOOKUP;
if (retval)
zfcp_erp_notify(&port->erp_action, 0);
goto out;
}
/* all other error condtions */
zfcp_erp_notify(&port->erp_action, 0);
out:
zfcp_port_put(port);
}

Expand Down

0 comments on commit 17a093e

Please sign in to comment.