* [Ocfs2-devel] [PATCH] ocfs2: release the buffer head in ocfs2_do_truncate.
@ 2009-08-12 6:42 Tao Ma
2009-08-17 19:53 ` Joel Becker
0 siblings, 1 reply; 2+ messages in thread
From: Tao Ma @ 2009-08-12 6:42 UTC (permalink / raw)
To: ocfs2-devel
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>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Ocfs2-devel] [PATCH] ocfs2: release the buffer head in ocfs2_do_truncate.
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
0 siblings, 0 replies; 2+ messages in thread
From: Joel Becker @ 2009-08-17 19:53 UTC (permalink / raw)
To: ocfs2-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-17 19:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.