diff options
author | Christoph Hellwig <hch@lst.de> | 2018-05-31 19:11:39 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-06-01 15:38:19 +0200 |
commit | acddf3b308f6b6e23653de02e1abf98f402f1f12 (patch) | |
tree | 296aa44427ee604597d22412d212ae9744f7dd92 /block/blk-core.c | |
parent | block: remove the always unused name argument to elevator_init (diff) | |
download | linux-acddf3b308f6b6e23653de02e1abf98f402f1f12.tar.xz linux-acddf3b308f6b6e23653de02e1abf98f402f1f12.zip |
block: move sysfs_lock into elevator_init
Both callers take just around so function call, so move it in.
Also remove the now pointless blk_mq_sched_init wrapper.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Tested-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 18b691c93b63..cd573a33a6f3 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1175,16 +1175,8 @@ int blk_init_allocated_queue(struct request_queue *q) q->sg_reserved_size = INT_MAX; - /* Protect q->elevator from elevator_change */ - mutex_lock(&q->sysfs_lock); - - /* init elevator */ - if (elevator_init(q)) { - mutex_unlock(&q->sysfs_lock); + if (elevator_init(q)) goto out_exit_flush_rq; - } - - mutex_unlock(&q->sysfs_lock); return 0; out_exit_flush_rq: |