blk-mq: fix race in IO start accounting
authorJens Axboe <axboe@fb.com>
Fri, 9 May 2014 20:54:08 +0000 (14:54 -0600)
committerJens Axboe <axboe@fb.com>
Mon, 30 Mar 2015 18:54:47 +0000 (12:54 -0600)
commite5421a028b0eb7fac47272adcda5c3a96fc45d6e
treeba935016d114dd225c245cef36bc0ae5e8a6c549
parent16dd9632b19da0c2886a2258156169236ca4b2c4
blk-mq: fix race in IO start accounting

Commit c6d600c6 opened up a small race where we could attempt to
account IO completion on a request, racing with IO start accounting.
Fix this up by ensuring that we've accounted for IO start before
inserting the request.

Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c