summaryrefslogtreecommitdiffstats
path: root/block/blk-merge.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/blk-merge.c
parent6cf7677f1a94546e472658290b3b8bdbb16cc045 (diff)
downloadlinux-stable-34fe7c05400663e01e23cddd1fea68bb7a2b3d29.tar.gz
linux-stable-34fe7c05400663e01e23cddd1fea68bb7a2b3d29.tar.bz2
linux-stable-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/blk-merge.c')
-rw-r--r--block/blk-merge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c
index c956d9e7aafd..6cbd90ad5f90 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -801,7 +801,7 @@ bool blk_rq_merge_ok(struct request *rq, struct bio *bio)
return true;
}
-int blk_try_merge(struct request *rq, struct bio *bio)
+enum elv_merge blk_try_merge(struct request *rq, struct bio *bio)
{
if (blk_rq_pos(rq) + blk_rq_sectors(rq) == bio->bi_iter.bi_sector)
return ELEVATOR_BACK_MERGE;