Skip to content

Commit d7dbd43

Browse files
masonclaxboe
authored andcommitted
blk-cgroup: properly pin the parent in blkcg_css_online
blkcg_css_online is supposed to pin the blkcg of the parent, but 397c9f4 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: 397c9f4 ("blk-cgroup: move blkcg_{pin,unpin}_online out of line") Signed-off-by: Chris Mason <[email protected]> Spotted-by: Rik van Riel <[email protected]> Cc: <[email protected]> # v5.19+ Acked-by: Johannes Weiner <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent df24560 commit d7dbd43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block/blk-cgroup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,7 @@ static int blkcg_css_online(struct cgroup_subsys_state *css)
12131213
* parent so that offline always happens towards the root.
12141214
*/
12151215
if (parent)
1216-
blkcg_pin_online(css);
1216+
blkcg_pin_online(&parent->css);
12171217
return 0;
12181218
}
12191219

0 commit comments

Comments
 (0)