summaryrefslogtreecommitdiffstats
path: root/block/blk-mq-sched.h
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2017-05-26 19:53:20 +0800
committerJens Axboe <axboe@fb.com>2017-05-26 14:12:04 -0600
commit9bddeb2a5b981507cbe2d7bdb545c32f204109c7 (patch)
treec4ec4b6a5ccf0df214f33780375f9fe5afcff12a /block/blk-mq-sched.h
parentab42f35d9cb5ac49b5a2a11f940e74f58f207280 (diff)
downloadlinux-stable-9bddeb2a5b981507cbe2d7bdb545c32f204109c7.tar.gz
linux-stable-9bddeb2a5b981507cbe2d7bdb545c32f204109c7.tar.bz2
linux-stable-9bddeb2a5b981507cbe2d7bdb545c32f204109c7.zip
blk-mq: make per-sw-queue bio merge as default .bio_merge
Because what the per-sw-queue bio merge does is basically same with scheduler's .bio_merge(), this patch makes per-sw-queue bio merge as the default .bio_merge if no scheduler is used or io scheduler doesn't provide .bio_merge(). Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq-sched.h')
-rw-r--r--block/blk-mq-sched.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/block/blk-mq-sched.h b/block/blk-mq-sched.h
index edafb5383b7b..b87e5be5db8c 100644
--- a/block/blk-mq-sched.h
+++ b/block/blk-mq-sched.h
@@ -38,9 +38,7 @@ int blk_mq_sched_init(struct request_queue *q);
static inline bool
blk_mq_sched_bio_merge(struct request_queue *q, struct bio *bio)
{
- struct elevator_queue *e = q->elevator;
-
- if (!e || blk_queue_nomerges(q) || !bio_mergeable(bio))
+ if (blk_queue_nomerges(q) || !bio_mergeable(bio))
return false;
return __blk_mq_sched_bio_merge(q, bio);