diff options
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r-- | block/blk-sysfs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 4db5abf96b9e..17f5c84ce7bf 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c | |||
@@ -554,8 +554,10 @@ int blk_register_queue(struct gendisk *disk) | |||
554 | * Initialization must be complete by now. Finish the initial | 554 | * Initialization must be complete by now. Finish the initial |
555 | * bypass from queue allocation. | 555 | * bypass from queue allocation. |
556 | */ | 556 | */ |
557 | queue_flag_set_unlocked(QUEUE_FLAG_INIT_DONE, q); | 557 | if (!blk_queue_init_done(q)) { |
558 | blk_queue_bypass_end(q); | 558 | queue_flag_set_unlocked(QUEUE_FLAG_INIT_DONE, q); |
559 | blk_queue_bypass_end(q); | ||
560 | } | ||
559 | 561 | ||
560 | ret = blk_trace_init_sysfs(dev); | 562 | ret = blk_trace_init_sysfs(dev); |
561 | if (ret) | 563 | if (ret) |