blk-mq: fix use-after-free of request
authorMing Lei <tom.leiming@gmail.com>
Fri, 24 Jan 2014 21:10:32 +0000 (13:10 -0800)
committerJens Axboe <axboe@fb.com>
Mon, 30 Mar 2015 18:54:40 +0000 (12:54 -0600)
commit013a74cec4ac53904d2f88ed6857d275eac1d68a
treeac432e7b96bf2698bbea9ba40742a7adb53d30b9
parent112af67961228202d742ad6a0907e2fe6181fe0c
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