diff options
author | Tao Ma <tao.ma@oracle.com> | 2009-08-12 02:42:47 -0400 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2009-08-17 15:50:35 -0400 |
commit | 60e2ec48665b8495360ca4a6004c5cd52beb2bc1 (patch) | |
tree | dbd938e337b3191bbe16336cb414b9d55c5fdc81 /fs/ocfs2 | |
parent | ada508274b8698a33cb0e5bd037db0f9dc781795 (diff) |
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 <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | 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 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, | |||
6851 | } | 6851 | } |
6852 | status = 0; | 6852 | status = 0; |
6853 | bail: | 6853 | bail: |
6854 | 6854 | brelse(last_eb_bh); | |
6855 | mlog_exit(status); | 6855 | mlog_exit(status); |
6856 | return status; | 6856 | return status; |
6857 | } | 6857 | } |