From: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
To: Yoshinori Sano <yoshinori.sano@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: fix memory leak in start_transaction()
Date: Mon, 04 Apr 2011 09:14:13 +0900 [thread overview]
Message-ID: <4D990D55.1000504@jp.fujitsu.com> (raw)
In-Reply-To: <1301833888-31238-1-git-send-email-yoshinori.sano@gmail.com>
(2011/04/03 21:31), Yoshinori Sano wrote:
> Free btrfs_trans_handle when join_transaction() fails
> in start_transaction()
Woops! It's my mistake in http://marc.info/?l=linux-btrfs&m=130086817629289&w=2.
Thanks for the point.
---
Tsutomu
>
> Signed-off-by: Yoshinori Sano <yoshinori.sano@gmail.com>
> ---
> fs/btrfs/transaction.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
> index ce48eb5..d01cc24 100644
> --- a/fs/btrfs/transaction.c
> +++ b/fs/btrfs/transaction.c
> @@ -197,6 +197,7 @@ again:
>
> ret = join_transaction(root);
> if (ret < 0) {
> + kmem_cache_free(btrfs_trans_handle_cachep, h);
> if (type != TRANS_JOIN_NOLOCK)
> mutex_unlock(&root->fs_info->trans_mutex);
> return ERR_PTR(ret);
next prev parent reply other threads:[~2011-04-04 0:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-03 12:31 [PATCH] Btrfs: fix memory leak in start_transaction() Yoshinori Sano
2011-04-04 0:14 ` Tsutomu Itoh [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-09-20 4:14 Miao Xie
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=4D990D55.1000504@jp.fujitsu.com \
--to=t-itoh@jp.fujitsu.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=yoshinori.sano@gmail.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).