Skip to content

Commit

Permalink
ocfs2: release the buffer head in ocfs2_do_truncate.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tao Ma authored and Joel Becker committed Aug 17, 2009
1 parent ada5082 commit 60e2ec4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ocfs2/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 60e2ec4

Please sign in to comment.