@@ -871,7 +871,7 @@ blk_init_allocated_queue(struct request_queue *q, request_fn_proc *rfn,
mutex_lock(&q->sysfs_lock);
/* init elevator */
- if (elevator_init(q, NULL)) {
+ if (elevator_init(q)) {
mutex_unlock(&q->sysfs_lock);
goto fail;
}
@@ -177,7 +177,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;
@@ -196,18 +196,12 @@ int elevator_init(struct request_queue *q, char *name)
q->end_sector = 0;
q->boundary_rq = NULL;
- if (name) {
- e = elevator_get(name, true);
- if (!e)
- return -EINVAL;
- }
-
/*
* Use the default elevator specified by config boot param or
* 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 && *chosen_elevator) {
+ if (*chosen_elevator) {
e = elevator_get(chosen_elevator, false);
if (!e)
printk(KERN_ERR "I/O scheduler %s not found\n",
@@ -159,7 +159,7 @@ extern void elv_unregister(struct elevator_type *);
extern ssize_t elv_iosched_show(struct request_queue *, char *);
extern ssize_t elv_iosched_store(struct request_queue *, const char *, size_t);
-extern int elevator_init(struct request_queue *, char *);
+extern int elevator_init(struct request_queue *);
extern void elevator_exit(struct elevator_queue *);
extern int elevator_change(struct request_queue *, const char *);
extern bool elv_bio_merge_ok(struct request *, struct bio *);