From: Tao Ma Date: Wed, 12 Aug 2009 06:42:47 +0000 (+0800) Subject: ocfs2: release the buffer head in ocfs2_do_truncate. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=60e2ec48665b8495360ca4a6004c5cd52beb2bc1;p=linux-beck.git ocfs2: release the buffer head in ocfs2_do_truncate. 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 Signed-off-by: Joel Becker --- diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index f9a3e8942669..ab513ddaeff2 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; }