mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
[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>
This commit is contained in:
parent
379d6bf657
commit
17a093ef01
1 changed files with 10 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue