diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2007-05-08 05:17:54 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-05-08 12:56:50 -0400 |
commit | ca2d02c2f9ea476062ae181eec60b8bcd97857d6 (patch) | |
tree | dffe33856db601a173a117263b9ee4799d555ac6 /drivers/s390/scsi/zfcp_qdio.c | |
parent | 5f852be9e11d62223ea063f6ceed4f9677f54051 (diff) |
[SCSI] zfcp: rework request ID management.
Simplify request ID management and make sure that frequently used
functions are inlined. Also fix a memory leak in zfcp_adapter_enqueue()
which only gets hit in error handling.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_qdio.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_qdio.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/s390/scsi/zfcp_qdio.c b/drivers/s390/scsi/zfcp_qdio.c index e50e6ad4e6cb..cb08ca3cc0f9 100644 --- a/drivers/s390/scsi/zfcp_qdio.c +++ b/drivers/s390/scsi/zfcp_qdio.c | |||
@@ -283,7 +283,7 @@ zfcp_qdio_request_handler(struct ccw_device *ccw_device, | |||
283 | } | 283 | } |
284 | 284 | ||
285 | /** | 285 | /** |
286 | * zfcp_qdio_reqid_check - checks for valid reqids or unsolicited status | 286 | * zfcp_qdio_reqid_check - checks for valid reqids. |
287 | */ | 287 | */ |
288 | static void zfcp_qdio_reqid_check(struct zfcp_adapter *adapter, | 288 | static void zfcp_qdio_reqid_check(struct zfcp_adapter *adapter, |
289 | unsigned long req_id) | 289 | unsigned long req_id) |
@@ -294,14 +294,17 @@ static void zfcp_qdio_reqid_check(struct zfcp_adapter *adapter, | |||
294 | debug_long_event(adapter->erp_dbf, 4, req_id); | 294 | debug_long_event(adapter->erp_dbf, 4, req_id); |
295 | 295 | ||
296 | spin_lock_irqsave(&adapter->req_list_lock, flags); | 296 | spin_lock_irqsave(&adapter->req_list_lock, flags); |
297 | fsf_req = zfcp_reqlist_ismember(adapter, req_id); | 297 | fsf_req = zfcp_reqlist_find(adapter, req_id); |
298 | 298 | ||
299 | if (!fsf_req) { | 299 | if (!fsf_req) |
300 | spin_unlock_irqrestore(&adapter->req_list_lock, flags); | 300 | /* |
301 | panic("error: unknown request id (%ld).\n", req_id); | 301 | * Unknown request means that we have potentially memory |
302 | } | 302 | * corruption and must stop the machine immediatly. |
303 | */ | ||
304 | panic("error: unknown request id (%ld) on adapter %s.\n", | ||
305 | req_id, zfcp_get_busid_by_adapter(adapter)); | ||
303 | 306 | ||
304 | zfcp_reqlist_remove(adapter, req_id); | 307 | zfcp_reqlist_remove(adapter, fsf_req); |
305 | atomic_dec(&adapter->reqs_active); | 308 | atomic_dec(&adapter->reqs_active); |
306 | spin_unlock_irqrestore(&adapter->req_list_lock, flags); | 309 | spin_unlock_irqrestore(&adapter->req_list_lock, flags); |
307 | 310 | ||