]> git.baikalelectronics.ru Git - kernel.git/commit
blk-cgroup: fix missing put device in error path from blkg_conf_pref()
authorYu Kuai <yukuai3@huawei.com>
Tue, 2 Nov 2021 02:07:05 +0000 (10:07 +0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 19 Nov 2021 13:26:45 +0000 (06:26 -0700)
commit2b89bfa0966dc65d3310b89fe78781fc8d9b7b21
treee5033b346313dc217878e56250db2ff47cd16dc4
parentaa7aa99a7a935b2613d496cc8cbc2089100cee6a
blk-cgroup: fix missing put device in error path from blkg_conf_pref()

If blk_queue_enter() failed due to queue is dying, the
blkdev_put_no_open() is needed because blkcg_conf_open_bdev() succeeded.

Fixes: 5bdf84ba8864 ("blk-cgroup: synchronize blkg creation against policy deactivation")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20211102020705.2321858-1-yukuai3@huawei.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-cgroup.c