ocfs2: release the buffer head in ocfs2_do_truncate.
authorTao Ma <tao.ma@oracle.com>
Wed, 12 Aug 2009 06:42:47 +0000 (14:42 +0800)
committerJoel Becker <joel.becker@oracle.com>
Mon, 17 Aug 2009 19:50:35 +0000 (12:50 -0700)
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>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/alloc.c

index f9a3e8942669f436ad64fa00b550a46f34cd44be..ab513ddaeff2f6944c5f0d54356e7484fa63cfeb 100644 (file)
@@ -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;
 }