linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Scott Talbert <scott.talbert@hgst.com>
To: <linux-btrfs@vger.kernel.org>
Subject: [PATCH] btrfs: fix memory leak during RAID 5/6 device replacement
Date: Mon, 9 May 2016 09:14:28 -0400	[thread overview]
Message-ID: <1462799668-26910-1-git-send-email-scott.talbert@hgst.com> (raw)

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);
+
 	btrfs_queue_work(fs_info->scrub_workers, &sblock->work);
 }
 
-- 
1.9.1


             reply	other threads:[~2016-05-09 13:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-09 13:14 Scott Talbert [this message]
2016-05-09 17:32 ` [PATCH] btrfs: fix memory leak during RAID 5/6 device replacement David Sterba
2016-05-13 10:31   ` Zhao Lei
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=1462799668-26910-1-git-send-email-scott.talbert@hgst.com \
    --to=scott.talbert@hgst.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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).