提交 610d886c 编写于 作者: J Jens Axboe

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: NDan Carpenter <dan.carpenter@oracle.com>
Fixes: dc877dbd088f ("blk-mq-sched: add framework for MQ capable IO schedulers")
Signed-off-by: NJens Axboe <axboe@fb.com>
上级 38dbb7dd
......@@ -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);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册