Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc7ecc25 authored by Josef Bacik's avatar Josef Bacik Committed by Jens Axboe
Browse files

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: default avatarJosef Bacik <josef@toxicpanda.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 52a1199c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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();