diff options
author | Johannes Thumshirn <jthumshirn@suse.de> | 2016-11-17 10:31:23 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-11-17 20:15:26 -0500 |
commit | fb6f7c8d8a19e5543d5b4d44c58e2c4e5a82bb12 (patch) | |
tree | 7c7626dfd808b37d35d06c31c603f434ee252782 /drivers/scsi | |
parent | 06548160dfecd1983ffd9d6795242a5cda095da5 (diff) | |
download | linux-stable-fb6f7c8d8a19e5543d5b4d44c58e2c4e5a82bb12.tar.gz linux-stable-fb6f7c8d8a19e5543d5b4d44c58e2c4e5a82bb12.tar.bz2 linux-stable-fb6f7c8d8a19e5543d5b4d44c58e2c4e5a82bb12.zip |
block: add bsg_job_put() and bsg_job_get()
Add bsg_job_put() and bsg_job_get() so don't need to export
bsg_destroy_job() any more.
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/scsi_transport_fc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index ee1e812bad4c..23e1eed932b5 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c @@ -3571,13 +3571,13 @@ fc_bsg_job_timeout(struct request *req) if (rport && rport->port_state == FC_PORTSTATE_BLOCKED) return BLK_EH_RESET_TIMER; - inflight = kref_get_unless_zero(&job->kref); + inflight = bsg_job_get(job); if (inflight && i->f->bsg_timeout) { /* call LLDD to abort the i/o as it has timed out */ err = i->f->bsg_timeout(job); if (err == -EAGAIN) { - kref_put(&job->kref, bsg_destroy_job); + bsg_job_put(job); return BLK_EH_RESET_TIMER; } else if (err) printk(KERN_ERR "ERROR: FC BSG request timeout - LLD " |