diff --git a/block/blk-core.c b/block/blk-core.c index b00e7e6340ca1941094b7d51ad62dc5b9830b559..18b691c93b63445e9cb55f114f1f86a50fe6f15f 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1179,7 +1179,7 @@ int blk_init_allocated_queue(struct request_queue *q) mutex_lock(&q->sysfs_lock); /* init elevator */ - if (elevator_init(q, NULL)) { + if (elevator_init(q)) { mutex_unlock(&q->sysfs_lock); goto out_exit_flush_rq; } diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c index b0f2c2a40a0c92a70ff7184a21d83131e336454e..fd4f68d61df0fa61ab6a3993d2d1e4cebe2fc77b 100644 --- a/block/blk-mq-sched.c +++ b/block/blk-mq-sched.c @@ -653,7 +653,7 @@ int blk_mq_sched_init(struct request_queue *q) int ret; mutex_lock(&q->sysfs_lock); - ret = elevator_init(q, NULL); + ret = elevator_init(q); mutex_unlock(&q->sysfs_lock); return ret; diff --git a/block/blk.h b/block/blk.h index a559c05323478b6ed0924bf651d57d29e1f55182..ab5ec2dadc7b7ff11481f543dca91423775962fc 100644 --- a/block/blk.h +++ b/block/blk.h @@ -231,7 +231,7 @@ static inline void elv_deactivate_rq(struct request_queue *q, struct request *rq e->type->ops.sq.elevator_deactivate_req_fn(q, rq); } -int elevator_init(struct request_queue *, char *); +int elevator_init(struct request_queue *); void elevator_exit(struct request_queue *, struct elevator_queue *); int elv_register_queue(struct request_queue *q); void elv_unregister_queue(struct request_queue *q); diff --git a/block/elevator.c b/block/elevator.c index a7baa4687b28d8de5fa83b055e24c6a3201a9170..9276540af2a17de0a6484f3649d758fba53c2ae9 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -199,7 +199,7 @@ static void elevator_release(struct kobject *kobj) kfree(e); } -int elevator_init(struct request_queue *q, char *name) +int elevator_init(struct request_queue *q) { struct elevator_type *e = NULL; int err; @@ -213,19 +213,13 @@ int elevator_init(struct request_queue *q, char *name) if (unlikely(q->elevator)) return 0; - if (name) { - e = elevator_get(q, name, true); - if (!e) - return -EINVAL; - } - /* * Use the default elevator specified by config boot param for * non-mq devices, or by config option. Don't try to load modules * as we could be running off async and request_module() isn't * allowed from async. */ - if (!e && !q->mq_ops && *chosen_elevator) { + if (!q->mq_ops && *chosen_elevator) { e = elevator_get(q, chosen_elevator, false); if (!e) printk(KERN_ERR "I/O scheduler %s not found\n",