RE: [PATCH] btrfs: fix memory leak during RAID 5/6 device replacement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Scott Talbert

> From: Zhao Lei [mailto:zhaolei@xxxxxxxxxxxxxx]
> Sent: Friday, May 13, 2016 6:31 PM
> To: 'dsterba@xxxxxxx' <dsterba@xxxxxxx>; 'Scott Talbert'
> <scott.talbert@xxxxxxxx>
> Cc: 'linux-btrfs@xxxxxxxxxxxxxxx' <linux-btrfs@xxxxxxxxxxxxxxx>
> Subject: RE: [PATCH] btrfs: fix memory leak during RAID 5/6 device replacement
> 
> Hi, Scott Talbert
> 
> * From: David Sterba [mailto:dsterba@xxxxxxx]
> > Sent: Tuesday, May 10, 2016 1:32 AM
> > To: Scott Talbert <scott.talbert@xxxxxxxx>
> > Cc: linux-btrfs@xxxxxxxxxxxxxxx; Zhao Lei <zhaolei@xxxxxxxxxxxxxx>
> > Subject: Re: [PATCH] btrfs: fix memory leak during RAID 5/6 device
> replacement
> >
> > CC Zhao Lei <zhaolei@xxxxxxxxxxxxxx>
> >
> > On Mon, May 09, 2016 at 09:14:28AM -0400, Scott Talbert wrote:
> > > A 'struct bio' is allocated in scrub_missing_raid56_pages(), but it was never
> > > freed anywhere.
> > >
> > > Signed-off-by: Scott Talbert <scott.talbert@xxxxxxxx>
> > > ---
> > >  fs/btrfs/scrub.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
> > > index 82bedf9..607cc6e 100644
> > > --- a/fs/btrfs/scrub.c
> > > +++ b/fs/btrfs/scrub.c
> > > @@ -2130,6 +2130,8 @@ static void scrub_missing_raid56_end_io(struct
> > bio *bio)
> > >  	if (bio->bi_error)
> > >  		sblock->no_io_error_seen = 0;
> > >
> > > +	bio_put(bio);
> > > +
> Seems good by reviewing.
> I'll add some debug code to test it more detailedly.
> 
Signed-off-by: Zhao Lei <zhaolei@xxxxxxxxxxxxxx>
Test-by: Zhao Lei <zhaolei@xxxxxxxxxxxxxx>

Thanks
Zhaolei

> Thanks
> Zhaolei
> 
> > >  	btrfs_queue_work(fs_info->scrub_workers, &sblock->work);
> > >  }
> > >
> > > --
> > > 1.9.1
> > >
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> > > the body of a message to majordomo@xxxxxxxxxxxxxxx
> > > More majordomo info at  http://vger.kernel.org/majordomo-info.html




--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux