summaryrefslogtreecommitdiffstats
path: root/block/blk-settings.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@suse.de>2010-07-01 19:49:17 +0900
committerJens Axboe <jaxboe@fusionio.com>2010-08-07 18:23:47 +0200
commit28018c242a4ec7017bbbf81d2d3952f820a27118 (patch)
tree03732bef20d0e4dad30d81d9b9ad9ffcf5a2e41c /block/blk-settings.c
parente597cd09f711b28b8466ebdc2f12e55b44fa81e4 (diff)
downloadlinux-stable-28018c242a4ec7017bbbf81d2d3952f820a27118.tar.gz
linux-stable-28018c242a4ec7017bbbf81d2d3952f820a27118.tar.bz2
linux-stable-28018c242a4ec7017bbbf81d2d3952f820a27118.zip
block: implement an unprep function corresponding directly to prep
Reviewed-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block/blk-settings.c')
-rw-r--r--block/blk-settings.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/block/blk-settings.c b/block/blk-settings.c
index f5ed5a1187ba..a234f4bf1d6f 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -37,6 +37,23 @@ void blk_queue_prep_rq(struct request_queue *q, prep_rq_fn *pfn)
EXPORT_SYMBOL(blk_queue_prep_rq);
/**
+ * blk_queue_unprep_rq - set an unprepare_request function for queue
+ * @q: queue
+ * @ufn: unprepare_request function
+ *
+ * It's possible for a queue to register an unprepare_request callback
+ * which is invoked before the request is finally completed. The goal
+ * of the function is to deallocate any data that was allocated in the
+ * prepare_request callback.
+ *
+ */
+void blk_queue_unprep_rq(struct request_queue *q, unprep_rq_fn *ufn)
+{
+ q->unprep_rq_fn = ufn;
+}
+EXPORT_SYMBOL(blk_queue_unprep_rq);
+
+/**
* blk_queue_merge_bvec - set a merge_bvec function for queue
* @q: queue
* @mbfn: merge_bvec_fn