From: Joel Becker <Joel.Becker@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2: release the buffer head in ocfs2_do_truncate.
Date: Mon, 17 Aug 2009 12:53:31 -0700 [thread overview]
Message-ID: <20090817195331.GA29615@mail.oracle.com> (raw)
In-Reply-To: <1250059367-14040-1-git-send-email-tao.ma@oracle.com>
On Wed, Aug 12, 2009 at 02:42:47PM +0800, Tao Ma wrote:
> In ocfs2_do_truncate, we forget to release last_eb_bh which
> will cause memleak. So call brelse in the end.
>
> Signed-off-by: Tao Ma <tao.ma@oracle.com>
This is now in the fixes branch of ocfs2.git
Joel
> ---
> fs/ocfs2/alloc.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
> index f9a3e89..ab513dd 100644
> --- a/fs/ocfs2/alloc.c
> +++ b/fs/ocfs2/alloc.c
> @@ -6851,7 +6851,7 @@ static int ocfs2_do_truncate(struct ocfs2_super *osb,
> }
> status = 0;
> bail:
> -
> + brelse(last_eb_bh);
> mlog_exit(status);
> return status;
> }
> --
> 1.5.5
>
--
Life's Little Instruction Book #182
"Be romantic."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
prev parent reply other threads:[~2009-08-17 19:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-12 6:42 [Ocfs2-devel] [PATCH] ocfs2: release the buffer head in ocfs2_do_truncate Tao Ma
2009-08-17 19:53 ` Joel Becker [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=20090817195331.GA29615@mail.oracle.com \
--to=joel.becker@oracle.com \
--cc=ocfs2-devel@oss.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.