diff options
author | Christoph Hellwig <hch@lst.de> | 2021-11-23 21:53:07 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-11-29 16:38:44 +0300 |
commit | 0c6cb3a293fa9adc7be24d67ff7d201aefa50362 (patch) | |
tree | d06743648614a5733f030e42b582c5ba701a815f /block | |
parent | f46b81c54b241bf1ec01c8936a37201c99f94fc7 (diff) | |
download | linux-0c6cb3a293fa9adc7be24d67ff7d201aefa50362.tar.xz |
block: remove the e argument to elevator_exit
All callers pass q->elevator.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20211123185312.1432157-4-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-sysfs.c | 2 | ||||
-rw-r--r-- | block/blk.h | 2 | ||||
-rw-r--r-- | block/elevator.c | 8 |
3 files changed, 7 insertions, 5 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 1677eb4a680c..772347adc56b 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -747,7 +747,7 @@ static void blk_exit_queue(struct request_queue *q) */ if (q->elevator) { ioc_clear_queue(q); - elevator_exit(q, q->elevator); + elevator_exit(q); } /* diff --git a/block/blk.h b/block/blk.h index 2266cb1f7df5..4df2ce8d4999 100644 --- a/block/blk.h +++ b/block/blk.h @@ -266,7 +266,7 @@ void blk_insert_flush(struct request *rq); int elevator_switch_mq(struct request_queue *q, 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); void elv_unregister_queue(struct request_queue *q); diff --git a/block/elevator.c b/block/elevator.c index 3536cdd5fa12..ec98aed39c4f 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -188,8 +188,10 @@ static void elevator_release(struct kobject *kobj) 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); blk_mq_exit_sched(q, e); mutex_unlock(&e->sysfs_lock); @@ -596,7 +598,7 @@ int elevator_switch_mq(struct request_queue *q, ioc_clear_queue(q); blk_mq_sched_free_rqs(q); - elevator_exit(q, q->elevator); + elevator_exit(q); } ret = blk_mq_init_sched(q, new_e); @@ -607,7 +609,7 @@ int elevator_switch_mq(struct request_queue *q, ret = elv_register_queue(q, true); if (ret) { blk_mq_sched_free_rqs(q); - elevator_exit(q, q->elevator); + elevator_exit(q); goto out; } } |