aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--block/blk-core.c5
-rw-r--r--drivers/md/dm.c13
-rw-r--r--include/linux/blkdev.h2
3 files changed, 5 insertions, 15 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index b627558c461f..56ef387e7d27 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -38,8 +38,6 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(block_bio_remap);
38EXPORT_TRACEPOINT_SYMBOL_GPL(block_rq_remap); 38EXPORT_TRACEPOINT_SYMBOL_GPL(block_rq_remap);
39EXPORT_TRACEPOINT_SYMBOL_GPL(block_bio_complete); 39EXPORT_TRACEPOINT_SYMBOL_GPL(block_bio_complete);
40 40
41static int __make_request(struct request_queue *q, struct bio *bio);
42
43/* 41/*
44 * For the allocated request tables 42 * For the allocated request tables
45 */ 43 */
@@ -1213,7 +1211,7 @@ void init_request_from_bio(struct request *req, struct bio *bio)
1213 blk_rq_bio_prep(req->q, req, bio); 1211 blk_rq_bio_prep(req->q, req, bio);
1214} 1212}
1215 1213
1216static int __make_request(struct request_queue *q, struct bio *bio) 1214int __make_request(struct request_queue *q, struct bio *bio)
1217{ 1215{
1218 const bool sync = !!(bio->bi_rw & REQ_SYNC); 1216 const bool sync = !!(bio->bi_rw & REQ_SYNC);
1219 struct blk_plug *plug; 1217 struct blk_plug *plug;
@@ -1317,6 +1315,7 @@ out_unlock:
1317out: 1315out:
1318 return 0; 1316 return 0;
1319} 1317}
1318EXPORT_SYMBOL_GPL(__make_request); /* for device mapper only */
1320 1319
1321/* 1320/*
1322 * If bio->bi_dev is a partition, remap the location 1321 * If bio->bi_dev is a partition, remap the location
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 52b39f335bb3..d8d7b8d9dd28 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -180,9 +180,6 @@ struct mapped_device {
180 /* forced geometry settings */ 180 /* forced geometry settings */
181 struct hd_geometry geometry; 181 struct hd_geometry geometry;
182 182
183 /* For saving the address of __make_request for request based dm */
184 make_request_fn *saved_make_request_fn;
185
186 /* sysfs handle */ 183 /* sysfs handle */
187 struct kobject kobj; 184 struct kobject kobj;
188 185
@@ -1420,13 +1417,6 @@ static int _dm_request(struct request_queue *q, struct bio *bio)
1420 return 0; 1417 return 0;
1421} 1418}
1422 1419
1423static int dm_make_request(struct request_queue *q, struct bio *bio)
1424{
1425 struct mapped_device *md = q->queuedata;
1426
1427 return md->saved_make_request_fn(q, bio); /* call __make_request() */
1428}
1429
1430static int dm_request_based(struct mapped_device *md) 1420static int dm_request_based(struct mapped_device *md)
1431{ 1421{
1432 return blk_queue_stackable(md->queue); 1422 return blk_queue_stackable(md->queue);
@@ -1437,7 +1427,7 @@ static int dm_request(struct request_queue *q, struct bio *bio)
1437 struct mapped_device *md = q->queuedata; 1427 struct mapped_device *md = q->queuedata;
1438 1428
1439 if (dm_request_based(md)) 1429 if (dm_request_based(md))
1440 return dm_make_request(q, bio); 1430 return __make_request(q, bio);
1441 1431
1442 return _dm_request(q, bio); 1432 return _dm_request(q, bio);
1443} 1433}
@@ -2172,7 +2162,6 @@ static int dm_init_request_based_queue(struct mapped_device *md)
2172 return 0; 2162 return 0;
2173 2163
2174 md->queue = q; 2164 md->queue = q;
2175 md->saved_make_request_fn = md->queue->make_request_fn;
2176 dm_init_md_queue(md); 2165 dm_init_md_queue(md);
2177 blk_queue_softirq_done(md->queue, dm_softirq_done); 2166 blk_queue_softirq_done(md->queue, dm_softirq_done);
2178 blk_queue_prep_rq(md->queue, dm_prep_fn); 2167 blk_queue_prep_rq(md->queue, dm_prep_fn);
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 0e67c45b3bc9..e9c3d9b07630 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -675,6 +675,8 @@ extern int scsi_cmd_ioctl(struct request_queue *, struct gendisk *, fmode_t,
675extern int sg_scsi_ioctl(struct request_queue *, struct gendisk *, fmode_t, 675extern int sg_scsi_ioctl(struct request_queue *, struct gendisk *, fmode_t,
676 struct scsi_ioctl_command __user *); 676 struct scsi_ioctl_command __user *);
677 677
678extern int __make_request(struct request_queue *q, struct bio *bio);
679
678/* 680/*
679 * A queue has just exitted congestion. Note this in the global counter of 681 * A queue has just exitted congestion. Note this in the global counter of
680 * congested queues, and wake up anyone who was waiting for requests to be 682 * congested queues, and wake up anyone who was waiting for requests to be