blk-mq: fix schedule from atomic context
authorMing Lei <tom.leiming@gmail.com>
Sat, 31 May 2014 16:43:37 +0000 (00:43 +0800)
committerJens Axboe <axboe@fb.com>
Wed, 4 Jun 2014 03:04:39 +0000 (21:04 -0600)
commitcb96a42cc1f50ba1c7b1e9b2343bec80b926107f
treec69f953fcd7d04288903abe73a0f92f155882bfd
parent1aecfe4887713838c79bc52f774609a57db4f988
blk-mq: fix schedule from atomic context

blk_mq_put_ctx() has to be called before io_schedule() in
bt_get().

This patch fixes the problem by taking similar approach from
percpu_ida allocation for the situation.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq-tag.c
block/blk-mq-tag.h
block/blk-mq.c
block/blk-mq.h