block: add a read barrier in blk_queue_enter()
authorMing Lei <tom.leiming@gmail.com>
Mon, 27 Mar 2017 12:06:56 +0000 (20:06 +0800)
committerJens Axboe <axboe@fb.com>
Wed, 29 Mar 2017 14:03:42 +0000 (08:03 -0600)
commit5ed61d3f08d44937859dc537c5362ca293c98b04
tree02802c310ece8ac247bb016c5d58555612eea76e
parentd9d149a39690184f63d74e3425c1e90b1d7e67d6
block: add a read barrier in blk_queue_enter()

Without the barrier, reading DEAD flag of .q_usage_counter
and reading .mq_freeze_depth may be reordered, then the
following wait_event_interruptible() may never return.

Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-core.c