From: Christoph Hellwig Date: Sat, 14 Nov 2020 18:10:55 +0000 (+0100) Subject: blk-cgroup: fix a hd_struct leak in blkcg_fill_root_iostats X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=df1798c610ba84c48b75d8877307dab97a28f987;p=users%2Fhch%2Fblock.git blk-cgroup: fix a hd_struct leak in blkcg_fill_root_iostats disk_get_part needs to be paired with a disk_put_part. Fixes: ef45fe470e1 ("blk-cgroup: show global disk stats in root cgroup io.stat") Signed-off-by: Christoph Hellwig --- diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index c68bdf58c9a6..54fbe1e80cc4 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -849,6 +849,7 @@ static void blkcg_fill_root_iostats(void) blkg_iostat_set(&blkg->iostat.cur, &tmp); u64_stats_update_end(&blkg->iostat.sync); } + disk_put_part(part); } }