summaryrefslogtreecommitdiffstats
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-05-31 19:11:39 +0200
committerJens Axboe <axboe@kernel.dk>2018-06-01 07:38:19 -0600
commitacddf3b308f6b6e23653de02e1abf98f402f1f12 (patch)
tree296aa44427ee604597d22412d212ae9744f7dd92 /block/blk-core.c
parentddb7253254fee6922764043101f8b28b6a00595d (diff)
downloadlinux-0-day-acddf3b308f6b6e23653de02e1abf98f402f1f12.tar.gz
linux-0-day-acddf3b308f6b6e23653de02e1abf98f402f1f12.tar.xz
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.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 18b691c93b634..cd573a33a6f36 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: