mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
blk-cgroup: properly pin the parent in blkcg_css_online
commitd7dbd43f4a
upstream. blkcg_css_online is supposed to pin the blkcg of the parent, but397c9f46ee
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:397c9f46ee
("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
76c50d77b9
commit
d118247e40
1 changed files with 1 additions and 1 deletions
|
@ -1251,7 +1251,7 @@ static int blkcg_css_online(struct cgroup_subsys_state *css)
|
||||||
* parent so that offline always happens towards the root.
|
* parent so that offline always happens towards the root.
|
||||||
*/
|
*/
|
||||||
if (parent)
|
if (parent)
|
||||||
blkcg_pin_online(css);
|
blkcg_pin_online(&parent->css);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue