aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Van Assche <[email protected]>2019-09-30 16:00:44 -0700
committerJens Axboe <[email protected]>2019-10-07 08:31:59 -0600
commit73f1c77e65117e8f44074402e7cf5f4934505bfb (patch)
tree3a7fb97a3f7513d8551320623a1523379b405a53
parentbae85c156f619939ef6261f1bd4fabbe24361b50 (diff)
block: Reduce sysfs_lock locking inside blk_cleanup_queue()
Since blk_cleanup_queue() is called after blk_unregister_queue() and since that last function removes all sysfs attributes, serializing any code in blk_cleanup_queue() against sysfs callback methods nor against I/O scheduler changes is necessary. Hence remove the syfs_lock locking calls from the start of blk_cleanup_queue(). Cc: Christoph Hellwig <[email protected]> Cc: Ming Lei <[email protected]> Cc: Hannes Reinecke <[email protected]> Cc: Johannes Thumshirn <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
-rw-r--r--block/blk-core.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 8b51d9ec8ae3..ae506ac2dd48 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -339,13 +339,11 @@ void blk_cleanup_queue(struct request_queue *q)
WARN_ON_ONCE(blk_queue_registered(q));
/* mark @q DYING, no new request or merges will be allowed afterwards */
- mutex_lock(&q->sysfs_lock);
blk_set_queue_dying(q);
blk_queue_flag_set(QUEUE_FLAG_NOMERGES, q);
blk_queue_flag_set(QUEUE_FLAG_NOXMERGES, q);
blk_queue_flag_set(QUEUE_FLAG_DYING, q);
- mutex_unlock(&q->sysfs_lock);
/*
* Drain all requests queued before DYING marking. Set DEAD flag to