diff options
| author | Ming Lei <[email protected]> | 2019-08-27 19:01:45 +0800 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2019-08-27 10:40:20 -0600 |
| commit | c48dac137a62a5d6fa1ef3fa445cbd9c43655a76 (patch) | |
| tree | 0cbc830e7a790655bb0d012ca555f24852765fb3 /tools/perf/scripts/python | |
| parent | 9685b2270211628e27ea7880a02b52efd4524099 (diff) | |
block: don't hold q->sysfs_lock in elevator_init_mq
The original comment says:
q->sysfs_lock must be held to provide mutual exclusion between
elevator_switch() and here.
Which is simply wrong. elevator_init_mq() is only called from
blk_mq_init_allocated_queue, which is always called before the request
queue is registered via blk_register_queue(), for dm-rq or normal rq
based driver. However, queue's kobject is only exposed and added to sysfs
in blk_register_queue(). So there isn't such race between elevator_switch()
and elevator_init_mq().
So avoid to hold q->sysfs_lock in elevator_init_mq().
Cc: Christoph Hellwig <[email protected]>
Cc: Hannes Reinecke <[email protected]>
Cc: Greg KH <[email protected]>
Cc: Mike Snitzer <[email protected]>
Cc: Bart Van Assche <[email protected]>
Cc: Damien Le Moal <[email protected]>
Reviewed-by: Bart Van Assche <[email protected]>
Signed-off-by: Ming Lei <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions