diff options
author | Johannes Thumshirn <jthumshirn@suse.de> | 2016-11-17 10:31:20 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-11-17 20:15:25 -0500 |
commit | c00da4c90ffd066cdfe7f53ff3529c8ab4a35db0 (patch) | |
tree | d2cf6b3db87f8379926d039c6786947318cf7407 /block | |
parent | 75cc8cfc6e13d42d50c2bf4307d0a68c2a70f709 (diff) |
scsi: fc: Use bsg_destroy_job
fc_destroy_bsgjob() and bsg_destroy_job() are now 1:1 copies, so use the
latter. As bsg_destroy_job() comes from bsg-lib we need to select it in
Kconfig once CONFOG_SCSI_FC_ATTRS is active.
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 'block')
-rw-r--r-- | block/bsg-lib.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/block/bsg-lib.c b/block/bsg-lib.c index 632fb4006c40..9f1e8fde924a 100644 --- a/block/bsg-lib.c +++ b/block/bsg-lib.c @@ -32,9 +32,12 @@ * bsg_destroy_job - routine to teardown/delete a bsg job * @job: bsg_job that is to be torn down */ -static void bsg_destroy_job(struct kref *kref) +void bsg_destroy_job(struct kref *kref) { struct bsg_job *job = container_of(kref, struct bsg_job, kref); + struct request *rq = job->req; + + blk_end_request_all(rq, rq->errors); put_device(job->dev); /* release reference for the request */ @@ -42,6 +45,7 @@ static void bsg_destroy_job(struct kref *kref) kfree(job->reply_payload.sg_list); kfree(job); } +EXPORT_SYMBOL_GPL(bsg_destroy_job); /** * bsg_job_done - completion routine for bsg requests @@ -85,7 +89,6 @@ static void bsg_softirq_done(struct request *rq) { struct bsg_job *job = rq->special; - blk_end_request_all(rq, rq->errors); kref_put(&job->kref, bsg_destroy_job); } |