Skip to content

Commit b7131ee

Browse files
Christoph Hellwigaxboe
authored andcommitted
blk-cgroup: fix a hd_struct leak in blkcg_fill_root_iostats
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>
1 parent 9f16a66 commit b7131ee

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

block/blk-cgroup.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,7 @@ static void blkcg_fill_root_iostats(void)
849849
blkg_iostat_set(&blkg->iostat.cur, &tmp);
850850
u64_stats_update_end(&blkg->iostat.sync);
851851
}
852+
disk_put_part(part);
852853
}
853854
}
854855

0 commit comments

Comments
 (0)