Commit 0c6cb3a2 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

block: remove the e argument to elevator_exit

All callers pass q->elevator.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20211123185312.1432157-4-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent f46b81c5
...@@ -747,7 +747,7 @@ static void blk_exit_queue(struct request_queue *q) ...@@ -747,7 +747,7 @@ static void blk_exit_queue(struct request_queue *q)
*/ */
if (q->elevator) { if (q->elevator) {
ioc_clear_queue(q); ioc_clear_queue(q);
elevator_exit(q, q->elevator); elevator_exit(q);
} }
/* /*
......
...@@ -266,7 +266,7 @@ void blk_insert_flush(struct request *rq); ...@@ -266,7 +266,7 @@ void blk_insert_flush(struct request *rq);
int elevator_switch_mq(struct request_queue *q, int elevator_switch_mq(struct request_queue *q,
struct elevator_type *new_e); struct elevator_type *new_e);
void elevator_exit(struct request_queue *, struct elevator_queue *); void elevator_exit(struct request_queue *q);
int elv_register_queue(struct request_queue *q, bool uevent); int elv_register_queue(struct request_queue *q, bool uevent);
void elv_unregister_queue(struct request_queue *q); void elv_unregister_queue(struct request_queue *q);
......
...@@ -188,8 +188,10 @@ static void elevator_release(struct kobject *kobj) ...@@ -188,8 +188,10 @@ static void elevator_release(struct kobject *kobj)
kfree(e); kfree(e);
} }
void elevator_exit(struct request_queue *q, struct elevator_queue *e) void elevator_exit(struct request_queue *q)
{ {
struct elevator_queue *e = q->elevator;
mutex_lock(&e->sysfs_lock); mutex_lock(&e->sysfs_lock);
blk_mq_exit_sched(q, e); blk_mq_exit_sched(q, e);
mutex_unlock(&e->sysfs_lock); mutex_unlock(&e->sysfs_lock);
...@@ -596,7 +598,7 @@ int elevator_switch_mq(struct request_queue *q, ...@@ -596,7 +598,7 @@ int elevator_switch_mq(struct request_queue *q,
ioc_clear_queue(q); ioc_clear_queue(q);
blk_mq_sched_free_rqs(q); blk_mq_sched_free_rqs(q);
elevator_exit(q, q->elevator); elevator_exit(q);
} }
ret = blk_mq_init_sched(q, new_e); ret = blk_mq_init_sched(q, new_e);
...@@ -607,7 +609,7 @@ int elevator_switch_mq(struct request_queue *q, ...@@ -607,7 +609,7 @@ int elevator_switch_mq(struct request_queue *q,
ret = elv_register_queue(q, true); ret = elv_register_queue(q, true);
if (ret) { if (ret) {
blk_mq_sched_free_rqs(q); blk_mq_sched_free_rqs(q);
elevator_exit(q, q->elevator); elevator_exit(q);
goto out; goto out;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment