Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by mail19.linbit.com (LINBIT Mail Daemon) with ESMTP id 4C06F420666 for ; Fri, 20 Nov 2020 08:25:05 +0100 (CET) To: Christoph Hellwig , Jens Axboe References: <20201116145809.410558-1-hch@lst.de> <20201116145809.410558-54-hch@lst.de> From: Hannes Reinecke Message-ID: Date: Fri, 20 Nov 2020 08:25:03 +0100 MIME-Version: 1.0 In-Reply-To: <20201116145809.410558-54-hch@lst.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Cc: Justin Sanders , Mike Snitzer , "Michael S. Tsirkin" , Jason Wang , linux-nvme@lists.infradead.org, Song Liu , dm-devel@redhat.com, drbd-dev@lists.linbit.com, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, Ilya Dryomov , Jack Wang , Konrad Rzeszutek Wilk , Josef Bacik , nbd@other.debian.org, linux-raid@vger.kernel.org, Stefan Hajnoczi , ceph-devel@vger.kernel.org, linux-block@vger.kernel.org, "Martin K. Petersen" , Minchan Kim , linux-fsdevel@vger.kernel.org, Paolo Bonzini , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Subject: Re: [Drbd-dev] [PATCH 53/78] blk-cgroup: fix a hd_struct leak in blkcg_fill_root_iostats List-Id: "*Coordination* of development, patches, contributions -- *Questions* \(even to developers\) go to drbd-user, please." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 11/16/20 3:57 PM, Christoph Hellwig wrote: > 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 > --- > block/blk-cgroup.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c > index c68bdf58c9a6e1..54fbe1e80cc41a 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); > } > } > > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer