]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/s390/scsi/zfcp_def.h
[SCSI] zfcp: Hold queue lock when checking port handle for ELS command
[linux-2.6-omap-h63xx.git] / drivers / s390 / scsi / zfcp_def.h
index 294d0792e82b9bf4f765851b123f4803f8db9e2f..9e9f6c1e4e5d2e79441ef11c603da7ec228543a0 100644 (file)
@@ -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
  */