aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorSwen Schillig <swen@vnet.ibm.com>2009-07-13 09:06:12 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-07-30 09:49:58 -0400
commit17a093ef018481ee1760da19568bad3c11da395d (patch)
tree9e08225c884c1fe22c2e1b25e2715aed185a9241 /drivers/s390
parent379d6bf6573ee6541a38bbe9140c1f0b94e3feae (diff)
[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: 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>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/scsi/zfcp_erp.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
index b5562f952654..c75d6f35cb5f 100644
--- a/drivers/s390/scsi/zfcp_erp.c
+++ b/drivers/s390/scsi/zfcp_erp.c
@@ -848,11 +848,17 @@ void zfcp_erp_port_strategy_open_lookup(struct work_struct *work)
848 gid_pn_work); 848 gid_pn_work);
849 849
850 retval = zfcp_fc_ns_gid_pn(&port->erp_action); 850 retval = zfcp_fc_ns_gid_pn(&port->erp_action);
851 if (retval == -ENOMEM) 851 if (!retval) {
852 port->erp_action.step = ZFCP_ERP_STEP_NAMESERVER_LOOKUP;
853 goto out;
854 }
855 if (retval == -ENOMEM) {
852 zfcp_erp_notify(&port->erp_action, ZFCP_STATUS_ERP_LOWMEM); 856 zfcp_erp_notify(&port->erp_action, ZFCP_STATUS_ERP_LOWMEM);
853 port->erp_action.step = ZFCP_ERP_STEP_NAMESERVER_LOOKUP; 857 goto out;
854 if (retval) 858 }
855 zfcp_erp_notify(&port->erp_action, 0); 859 /* all other error condtions */
860 zfcp_erp_notify(&port->erp_action, 0);
861out:
856 zfcp_port_put(port); 862 zfcp_port_put(port);
857} 863}
858 864