summaryrefslogtreecommitdiffstats
path: root/block/elevator.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2017-01-19 15:10:13 +0100
committerJens Axboe <axboe@fb.com>2017-01-19 15:43:05 +0100
commit610d886c0c22fa7504e817b6d03c402de64b0264 (patch)
tree0faf9b2eea4e7bfddb03861f6a42cefb17b92e5d /block/elevator.c
parentblk-cgroup: don't quiesce the queue on policy activate/deactivate (diff)
downloadlinux-610d886c0c22fa7504e817b6d03c402de64b0264.tar.xz
linux-610d886c0c22fa7504e817b6d03c402de64b0264.zip
elevator: fix unnecessary put of elevator in failure case
We already checked that e is NULL, so no point in calling elevator_put() to free it. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Fixes: dc877dbd088f ("blk-mq-sched: add framework for MQ capable IO schedulers") Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to '')
-rw-r--r--block/elevator.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/block/elevator.c b/block/elevator.c
index bcba2dd5cb5c..ef7f59469acc 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -230,10 +230,6 @@ int elevator_init(struct request_queue *q, char *name)
printk(KERN_ERR
"Default I/O scheduler not found. " \
"Using noop/none.\n");
- if (q->mq_ops) {
- elevator_put(e);
- return 0;
- }
e = elevator_get("noop", false);
}
}