Skip to content

Commit

Permalink
blk-cgroup: fix a hd_struct leak in blkcg_fill_root_iostats
Browse files Browse the repository at this point in the history
disk_get_part needs to be paired with a disk_put_part.

Cc: stable@vger.kernel.org
Fixes: ef45fe4 ("blk-cgroup: show global disk stats in root cgroup io.stat")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Christoph Hellwig authored and axboe committed Nov 14, 2020
1 parent 9f16a66 commit b7131ee
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions block/blk-cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit b7131ee

Please sign in to comment.