提交 cc7ecc25 编写于 作者: J Josef Bacik 提交者: Jens Axboe

blk-cgroup: hold the queue ref during throttling

The blkg lifetime is protected by the queue lifetime, so we need to put
the queue _after_ we're done using the blkg.
Signed-off-by: NJosef Bacik <josef@toxicpanda.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 52a1199c
......@@ -1759,10 +1759,10 @@ void blkcg_maybe_throttle_current(void)
if (!blkg)
goto out;
rcu_read_unlock();
blk_put_queue(q);
blkcg_maybe_throttle_blkg(blkg, use_memdelay);
blkg_put(blkg);
blk_put_queue(q);
return;
out:
rcu_read_unlock();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册