blk-mq: Fix timeout and state order
authorKeith Busch <keith.busch@intel.com>
Tue, 29 May 2018 13:52:27 +0000 (15:52 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 29 May 2018 14:47:40 +0000 (08:47 -0600)
commitad103e79838d4b4cd4d6dd0bdfaef937e8652ae9
tree3373843f14ffb3bc33eaefa6cedea19baee89b39
parent01fc27d96950149c3e6c0b8dfbe05e26725381cb
blk-mq: Fix timeout and state order

The block layer had been setting the state to in-flight prior to updating
the timer. This is the wrong order since the timeout handler could observe
the in-flight state with the older timeout, believing the request had
expired when in fact it is just getting started.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c