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: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
52a1199ccd
commit
cc7ecc2585
1 changed files with 1 additions and 1 deletions
|
@ -1759,10 +1759,10 @@ void blkcg_maybe_throttle_current(void)
|
||||||
if (!blkg)
|
if (!blkg)
|
||||||
goto out;
|
goto out;
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
blk_put_queue(q);
|
|
||||||
|
|
||||||
blkcg_maybe_throttle_blkg(blkg, use_memdelay);
|
blkcg_maybe_throttle_blkg(blkg, use_memdelay);
|
||||||
blkg_put(blkg);
|
blkg_put(blkg);
|
||||||
|
blk_put_queue(q);
|
||||||
return;
|
return;
|
||||||
out:
|
out:
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
|
|
Loading…
Reference in a new issue