From: Jan Kara <jack@suse.cz>
To: Tao Ma <tao.ma@oracle.com>
Cc: linux-kernel@vger.kernel.org, sunil.mushran@oracle.com,
Andrew Morton <akpm@linux-foundation.org>,
Jan Kara <jack@suse.cz>
Subject: Re: [PATCH] JBD/JBD2: free j_wbuf if journal init fails.
Date: Tue, 10 Nov 2009 22:22:05 +0100 [thread overview]
Message-ID: <20091110212205.GE27326@duck.suse.cz> (raw)
In-Reply-To: <1257844402-7828-1-git-send-email-tao.ma@oracle.com>
On Tue 10-11-09 17:13:22, Tao Ma wrote:
> If journal init fails, we need to free j_wbuf.
Thanks, added to my tree.
Honza
>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Jan Kara <jack@suse.cz>
> Signed-off-by: Tao Ma <tao.ma@oracle.com>
> ---
> fs/jbd/journal.c | 2 ++
> fs/jbd2/journal.c | 2 ++
> 2 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c
> index bd3c073..49d5cd6 100644
> --- a/fs/jbd/journal.c
> +++ b/fs/jbd/journal.c
> @@ -756,6 +756,7 @@ journal_t * journal_init_dev(struct block_device *bdev,
>
> return journal;
> out_err:
> + kfree(journal->j_wbuf);
> kfree(journal);
> return NULL;
> }
> @@ -820,6 +821,7 @@ journal_t * journal_init_inode (struct inode *inode)
>
> return journal;
> out_err:
> + kfree(journal->j_wbuf);
> kfree(journal);
> return NULL;
> }
> diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
> index b0ab521..fed8538 100644
> --- a/fs/jbd2/journal.c
> +++ b/fs/jbd2/journal.c
> @@ -913,6 +913,7 @@ journal_t * jbd2_journal_init_dev(struct block_device *bdev,
>
> return journal;
> out_err:
> + kfree(journal->j_wbuf);
> jbd2_stats_proc_exit(journal);
> kfree(journal);
> return NULL;
> @@ -986,6 +987,7 @@ journal_t * jbd2_journal_init_inode (struct inode *inode)
>
> return journal;
> out_err:
> + kfree(journal->j_wbuf);
> jbd2_stats_proc_exit(journal);
> kfree(journal);
> return NULL;
> --
> 1.5.4.4
>
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
prev parent reply other threads:[~2009-11-10 21:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-10 9:13 Tao Ma
2009-11-10 21:22 ` Jan Kara [this message]
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=20091110212205.GE27326@duck.suse.cz \
--to=jack@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sunil.mushran@oracle.com \
--cc=tao.ma@oracle.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
all inboxes | Powered by JetHome®