[PATCH 37/44] block: export bsg_destroy_job

From: Johannes Thumshirn
Date: Tue Oct 11 2016 - 07:29:45 EST


Export bsg_destroy_job so we can use it from clients of bsg-lib.

Signed-off-by: Johannes Thumshirn <jthumshirn@xxxxxxx>
---
block/bsg-lib.c | 3 ++-
include/linux/bsg-lib.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/block/bsg-lib.c b/block/bsg-lib.c
index 632fb40..6b99c7f 100644
--- a/block/bsg-lib.c
+++ b/block/bsg-lib.c
@@ -32,7 +32,7 @@
* 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);

@@ -42,6 +42,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
diff --git a/include/linux/bsg-lib.h b/include/linux/bsg-lib.h
index 58e0717..67f7de6 100644
--- a/include/linux/bsg-lib.h
+++ b/include/linux/bsg-lib.h
@@ -69,5 +69,6 @@ void bsg_job_done(struct bsg_job *job, int result,
int bsg_setup_queue(struct device *dev, struct request_queue *q, char *name,
bsg_job_fn *job_fn, int dd_job_size);
void bsg_request_fn(struct request_queue *q);
+void bsg_destroy_job(struct kref *kref);

#endif
--
1.8.5.6