linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhao Lei <zhaolei@cn.fujitsu.com>
To: <dsterba@suse.cz>, "'Scott Talbert'" <scott.talbert@hgst.com>
Cc: <linux-btrfs@vger.kernel.org>
Subject: RE: [PATCH] btrfs: fix memory leak during RAID 5/6 device replacement
Date: Fri, 13 May 2016 18:31:23 +0800	[thread overview]
Message-ID: <002401d1ad02$98b3e000$ca1ba000$@cn.fujitsu.com> (raw)
In-Reply-To: <20160509173220.GO29353@twin.jikos.cz>

Hi, Scott Talbert

* From: David Sterba [mailto:dsterba@suse.cz]
> Sent: Tuesday, May 10, 2016 1:32 AM
> To: Scott Talbert <scott.talbert@hgst.com>
> Cc: linux-btrfs@vger.kernel.org; Zhao Lei <zhaolei@cn.fujitsu.com>
> Subject: Re: [PATCH] btrfs: fix memory leak during RAID 5/6 device replacement
> 
> CC Zhao Lei <zhaolei@cn.fujitsu.com>
> 
> 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@hgst.com>
> > ---
> >  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.

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@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html





  reply	other threads:[~2016-05-13 10:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-09 13:14 [PATCH] btrfs: fix memory leak during RAID 5/6 device replacement Scott Talbert
2016-05-09 17:32 ` David Sterba
2016-05-13 10:31   ` Zhao Lei [this message]
2016-05-16 12:34   ` Zhao Lei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='002401d1ad02$98b3e000$ca1ba000$@cn.fujitsu.com' \
    --to=zhaolei@cn.fujitsu.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=scott.talbert@hgst.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).