summaryrefslogtreecommitdiffstats
path: root/block/cfq-iosched.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-02-08 14:46:48 +0100
committerJens Axboe <axboe@fb.com>2017-02-08 13:43:06 -0700
commit34fe7c05400663e01e23cddd1fea68bb7a2b3d29 (patch)
treec03679f3bf7602925ecd9cbd6849af412b06d959 /block/cfq-iosched.c
parent6cf7677f1a94546e472658290b3b8bdbb16cc045 (diff)
downloadlinux-34fe7c05400663e01e23cddd1fea68bb7a2b3d29.tar.gz
linux-34fe7c05400663e01e23cddd1fea68bb7a2b3d29.tar.bz2
linux-34fe7c05400663e01e23cddd1fea68bb7a2b3d29.zip
block: enumify ELEVATOR_*_MERGE
Switch these constants to an enum, and make let the compiler ensure that all callers of blk_try_merge and elv_merge handle all potential values. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r--block/cfq-iosched.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index f0f29ee731e1..921262770636 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -2528,7 +2528,7 @@ static void cfq_remove_request(struct request *rq)
}
}
-static int cfq_merge(struct request_queue *q, struct request **req,
+static enum elv_merge cfq_merge(struct request_queue *q, struct request **req,
struct bio *bio)
{
struct cfq_data *cfqd = q->elevator->elevator_data;
@@ -2544,7 +2544,7 @@ static int cfq_merge(struct request_queue *q, struct request **req,
}
static void cfq_merged_request(struct request_queue *q, struct request *req,
- int type)
+ enum elv_merge type)
{
if (type == ELEVATOR_FRONT_MERGE) {
struct cfq_queue *cfqq = RQ_CFQQ(req);