Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77080
b: refs/heads/master
c: d1ad09d
h: refs/heads/master
v: v3
  • Loading branch information
Heiko Carstens authored and James Bottomley committed Jan 12, 2008
1 parent 8b37214 commit 73b293f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bfd90dce248a49ced2b7419ecf78af9f7f37039e
refs/heads/master: d1ad09db2fd551d49d65ef040591cb9298e70fb6
14 changes: 14 additions & 0 deletions trunk/drivers/s390/scsi/zfcp_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,20 @@ zfcp_reqlist_find(struct zfcp_adapter *adapter, unsigned long req_id)
return NULL;
}

static inline struct zfcp_fsf_req *
zfcp_reqlist_find_safe(struct zfcp_adapter *adapter, struct zfcp_fsf_req *req)
{
struct zfcp_fsf_req *request;
unsigned int idx;

for (idx = 0; idx < REQUEST_LIST_SIZE; idx++) {
list_for_each_entry(request, &adapter->req_list[idx], list)
if (request == req)
return request;
}
return NULL;
}

/*
* functions needed for reference/usage counting
*/
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/s390/scsi/zfcp_erp.c
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,8 @@ zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action)
if (erp_action->fsf_req) {
/* take lock to ensure that request is not deleted meanwhile */
spin_lock(&adapter->req_list_lock);
if (zfcp_reqlist_find(adapter, erp_action->fsf_req->req_id)) {
if (zfcp_reqlist_find_safe(adapter, erp_action->fsf_req) &&
erp_action->fsf_req->erp_action == erp_action) {
/* fsf_req still exists */
debug_text_event(adapter->erp_dbf, 3, "a_ca_req");
debug_event(adapter->erp_dbf, 3, &erp_action->fsf_req,
Expand Down

0 comments on commit 73b293f

Please sign in to comment.