blk-mq: fix use-after-free of request
authorMing Lei <tom.leiming@gmail.com>
Thu, 5 Dec 2013 17:50:39 +0000 (10:50 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 5 Dec 2013 17:50:39 +0000 (10:50 -0700)
commit0d11e6aca396e679c07b2dd6af5dc8b7f041fbbd
tree70c03f4a224b9fe3e7e140881d251a9472dc6149
parent959a35f13eb785f982d79b1aaa75872d05c821da
blk-mq: fix use-after-free of request

If accounting is on, we will do the IO completion accounting after
we have freed the request. Fix that by moving it sooner instead.

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