diff options
-rw-r--r-- | drivers/s390/scsi/zfcp_erp.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index c88babce9bca..9d3c4a9ba90c 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c | |||
@@ -841,29 +841,27 @@ zfcp_erp_action_exists(struct zfcp_erp_action *erp_action) | |||
841 | * | 841 | * |
842 | * returns: 0 | 842 | * returns: 0 |
843 | */ | 843 | */ |
844 | static int | 844 | static void |
845 | zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action) | 845 | zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action) |
846 | { | 846 | { |
847 | int retval = 0; | ||
848 | struct zfcp_fsf_req *fsf_req = NULL; | ||
849 | struct zfcp_adapter *adapter = erp_action->adapter; | 847 | struct zfcp_adapter *adapter = erp_action->adapter; |
850 | 848 | ||
851 | if (erp_action->fsf_req) { | 849 | if (erp_action->fsf_req) { |
852 | /* take lock to ensure that request is not deleted meanwhile */ | 850 | /* take lock to ensure that request is not deleted meanwhile */ |
853 | spin_lock(&adapter->req_list_lock); | 851 | spin_lock(&adapter->req_list_lock); |
854 | if ((!zfcp_reqlist_ismember(adapter, | 852 | if (zfcp_reqlist_ismember(adapter, |
855 | erp_action->fsf_req->req_id)) && | 853 | erp_action->fsf_req->req_id)) { |
856 | (fsf_req->erp_action == erp_action)) { | ||
857 | /* fsf_req still exists */ | 854 | /* fsf_req still exists */ |
858 | debug_text_event(adapter->erp_dbf, 3, "a_ca_req"); | 855 | debug_text_event(adapter->erp_dbf, 3, "a_ca_req"); |
859 | debug_event(adapter->erp_dbf, 3, &fsf_req, | 856 | debug_event(adapter->erp_dbf, 3, &erp_action->fsf_req, |
860 | sizeof (unsigned long)); | 857 | sizeof (unsigned long)); |
861 | /* dismiss fsf_req of timed out/dismissed erp_action */ | 858 | /* dismiss fsf_req of timed out/dismissed erp_action */ |
862 | if (erp_action->status & (ZFCP_STATUS_ERP_DISMISSED | | 859 | if (erp_action->status & (ZFCP_STATUS_ERP_DISMISSED | |
863 | ZFCP_STATUS_ERP_TIMEDOUT)) { | 860 | ZFCP_STATUS_ERP_TIMEDOUT)) { |
864 | debug_text_event(adapter->erp_dbf, 3, | 861 | debug_text_event(adapter->erp_dbf, 3, |
865 | "a_ca_disreq"); | 862 | "a_ca_disreq"); |
866 | fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED; | 863 | erp_action->fsf_req->status |= |
864 | ZFCP_STATUS_FSFREQ_DISMISSED; | ||
867 | } | 865 | } |
868 | if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT) { | 866 | if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT) { |
869 | ZFCP_LOG_NORMAL("error: erp step timed out " | 867 | ZFCP_LOG_NORMAL("error: erp step timed out " |
@@ -876,11 +874,11 @@ zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action) | |||
876 | * then keep it running asynchronously and don't mess | 874 | * then keep it running asynchronously and don't mess |
877 | * with the association of erp_action and fsf_req. | 875 | * with the association of erp_action and fsf_req. |
878 | */ | 876 | */ |
879 | if (fsf_req->status & (ZFCP_STATUS_FSFREQ_COMPLETED | | 877 | if (erp_action->fsf_req->status & |
878 | (ZFCP_STATUS_FSFREQ_COMPLETED | | ||
880 | ZFCP_STATUS_FSFREQ_DISMISSED)) { | 879 | ZFCP_STATUS_FSFREQ_DISMISSED)) { |
881 | /* forget about association between fsf_req | 880 | /* forget about association between fsf_req |
882 | and erp_action */ | 881 | and erp_action */ |
883 | fsf_req->erp_action = NULL; | ||
884 | erp_action->fsf_req = NULL; | 882 | erp_action->fsf_req = NULL; |
885 | } | 883 | } |
886 | } else { | 884 | } else { |
@@ -894,8 +892,6 @@ zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action) | |||
894 | spin_unlock(&adapter->req_list_lock); | 892 | spin_unlock(&adapter->req_list_lock); |
895 | } else | 893 | } else |
896 | debug_text_event(adapter->erp_dbf, 3, "a_ca_noreq"); | 894 | debug_text_event(adapter->erp_dbf, 3, "a_ca_noreq"); |
897 | |||
898 | return retval; | ||
899 | } | 895 | } |
900 | 896 | ||
901 | /** | 897 | /** |