aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_fsf.c
diff options
context:
space:
mode:
authorSwen Schillig <swen@vnet.ibm.com>2009-11-24 10:53:59 -0500
committerJames Bottomley <James.Bottomley@suse.de>2009-12-04 13:02:02 -0500
commitf3450c7b917201bb49d67032e9f60d5125675d6a (patch)
tree404b1c23490b0a5ba3d6cbbb14e64381a12a108a /drivers/s390/scsi/zfcp_fsf.c
parentecf0c7721b104c0ce9c8ca534c911f6310cf92a8 (diff)
[SCSI] zfcp: Replace local reference counting with common kref
Replace the local reference counting by already available mechanisms offered by kref. Where possible existing device structures were used, including the same functionality. 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@suse.de>
Diffstat (limited to 'drivers/s390/scsi/zfcp_fsf.c')
-rw-r--r--drivers/s390/scsi/zfcp_fsf.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index 9df62f686812..3aad70916289 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -1492,7 +1492,7 @@ static void zfcp_fsf_open_port_handler(struct zfcp_fsf_req *req)
1492 } 1492 }
1493 1493
1494out: 1494out:
1495 zfcp_port_put(port); 1495 put_device(&port->sysfs_device);
1496} 1496}
1497 1497
1498/** 1498/**
@@ -1530,14 +1530,14 @@ int zfcp_fsf_open_port(struct zfcp_erp_action *erp_action)
1530 req->data = port; 1530 req->data = port;
1531 req->erp_action = erp_action; 1531 req->erp_action = erp_action;
1532 erp_action->fsf_req = req; 1532 erp_action->fsf_req = req;
1533 zfcp_port_get(port); 1533 get_device(&port->sysfs_device);
1534 1534
1535 zfcp_fsf_start_erp_timer(req); 1535 zfcp_fsf_start_erp_timer(req);
1536 retval = zfcp_fsf_req_send(req); 1536 retval = zfcp_fsf_req_send(req);
1537 if (retval) { 1537 if (retval) {
1538 zfcp_fsf_req_free(req); 1538 zfcp_fsf_req_free(req);
1539 erp_action->fsf_req = NULL; 1539 erp_action->fsf_req = NULL;
1540 zfcp_port_put(port); 1540 put_device(&port->sysfs_device);
1541 } 1541 }
1542out: 1542out:
1543 spin_unlock_bh(&qdio->req_q_lock); 1543 spin_unlock_bh(&qdio->req_q_lock);
@@ -2335,7 +2335,7 @@ skip_fsfstatus:
2335 else { 2335 else {
2336 zfcp_fsf_send_fcp_command_task_handler(req); 2336 zfcp_fsf_send_fcp_command_task_handler(req);
2337 req->unit = NULL; 2337 req->unit = NULL;
2338 zfcp_unit_put(unit); 2338 put_device(&unit->sysfs_device);
2339 } 2339 }
2340} 2340}
2341 2341
@@ -2387,7 +2387,7 @@ int zfcp_fsf_send_fcp_command_task(struct zfcp_unit *unit,
2387 } 2387 }
2388 2388
2389 req->status |= ZFCP_STATUS_FSFREQ_CLEANUP; 2389 req->status |= ZFCP_STATUS_FSFREQ_CLEANUP;
2390 zfcp_unit_get(unit); 2390 get_device(&unit->sysfs_device);
2391 req->unit = unit; 2391 req->unit = unit;
2392 req->data = scsi_cmnd; 2392 req->data = scsi_cmnd;
2393 req->handler = zfcp_fsf_send_fcp_command_handler; 2393 req->handler = zfcp_fsf_send_fcp_command_handler;
@@ -2463,7 +2463,7 @@ int zfcp_fsf_send_fcp_command_task(struct zfcp_unit *unit,
2463 goto out; 2463 goto out;
2464 2464
2465failed_scsi_cmnd: 2465failed_scsi_cmnd:
2466 zfcp_unit_put(unit); 2466 put_device(&unit->sysfs_device);
2467 zfcp_fsf_req_free(req); 2467 zfcp_fsf_req_free(req);
2468 scsi_cmnd->host_scribble = NULL; 2468 scsi_cmnd->host_scribble = NULL;
2469out: 2469out: