From: Jan Kara <jack@suse.cz>
To: Namjae Jeon <linkinjeon@gmail.com>
Cc: jack@suse.cz, linux-kernel@vger.kernel.org,
Namjae Jeon <namjae.jeon@samsung.com>,
Ashish Sangwan <a.sangwan@samsung.com>
Subject: Re: [PATCH 1/6] udf: fix memory leak while allocating blocks during write
Date: Thu, 11 Oct 2012 20:11:26 +0200 [thread overview]
Message-ID: <20121011181126.GC18391@quack.suse.cz> (raw)
In-Reply-To: <1349795336-6353-1-git-send-email-linkinjeon@gmail.com>
On Wed 10-10-12 00:08:56, Namjae Jeon wrote:
> From: Namjae Jeon <namjae.jeon@samsung.com>
>
> Need to brelse the buffer_head stored in cur_epos and next_epos.
>
> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
> Signed-off-by: Ashish Sangwan <a.sangwan@samsung.com>
Thanks. I've merged the patch.
Honza
> ---
> fs/udf/inode.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/fs/udf/inode.c b/fs/udf/inode.c
> index df88b95..2b77593 100644
> --- a/fs/udf/inode.c
> +++ b/fs/udf/inode.c
> @@ -765,6 +765,8 @@ static sector_t inode_getblk(struct inode *inode, sector_t block,
> goal, err);
> if (!newblocknum) {
> brelse(prev_epos.bh);
> + brelse(cur_epos.bh);
> + brelse(next_epos.bh);
> *err = -ENOSPC;
> return 0;
> }
> @@ -795,6 +797,8 @@ static sector_t inode_getblk(struct inode *inode, sector_t block,
> udf_update_extents(inode, laarr, startnum, endnum, &prev_epos);
>
> brelse(prev_epos.bh);
> + brelse(cur_epos.bh);
> + brelse(next_epos.bh);
>
> newblock = udf_get_pblock(inode->i_sb, newblocknum,
> iinfo->i_location.partitionReferenceNum, 0);
> --
> 1.7.9.5
>
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
prev parent reply other threads:[~2012-10-11 18:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-09 15:08 Namjae Jeon
2012-10-11 18:11 ` 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=20121011181126.GC18391@quack.suse.cz \
--to=jack@suse.cz \
--cc=a.sangwan@samsung.com \
--cc=linkinjeon@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namjae.jeon@samsung.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®