mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
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: ef45fe470e
("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>
This commit is contained in:
committed by
Jens Axboe
parent
9f16a66733
commit
b7131ee0ba
@@ -849,6 +849,7 @@ static void blkcg_fill_root_iostats(void)
|
|||||||
blkg_iostat_set(&blkg->iostat.cur, &tmp);
|
blkg_iostat_set(&blkg->iostat.cur, &tmp);
|
||||||
u64_stats_update_end(&blkg->iostat.sync);
|
u64_stats_update_end(&blkg->iostat.sync);
|
||||||
}
|
}
|
||||||
|
disk_put_part(part);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user