]> git.baikalelectronics.ru Git - kernel.git/commit
blk-cgroup: properly pin the parent in blkcg_css_online
authorChris Mason <clm@fb.com>
Mon, 14 Nov 2022 18:19:30 +0000 (10:19 -0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 14 Nov 2022 19:13:19 +0000 (12:13 -0700)
commit5397d603a96f421e5098e97a87a6ed48348d2d76
tree4b8e162690d66fc78dff1a3e431b8751db663c1a
parent75e42f6093b3c34341788f6259302a7c4e3605c0
blk-cgroup: properly pin the parent in blkcg_css_online

blkcg_css_online is supposed to pin the blkcg of the parent, but
1abe23e9f24f refactored things and along the way, changed it to pin the
css instead.  This results in extra pins, and we end up leaking blkcgs
and cgroups.

Fixes: 1abe23e9f24f ("blk-cgroup: move blkcg_{pin,unpin}_online out of line")
Signed-off-by: Chris Mason <clm@fb.com>
Spotted-by: Rik van Riel <riel@surriel.com>
Cc: <stable@vger.kernel.org> # v5.19+
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Link: https://lore.kernel.org/r/20221114181930.2093706-1-clm@fb.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-cgroup.c