Skip to content

Commit

Permalink
ext4: lost brelse in ext4_read_inode()
Browse files Browse the repository at this point in the history
One of error path in ext4_read_inode() leaks bh since brelse is forgoten.

Signed-off-by: Kirill Korotaev <dev@openvz.org>
Acked-by: Vasily Averin <vvs@sw.ru>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Kirill Korotaev authored and Linus Torvalds committed Jun 24, 2007
1 parent e4a10a3 commit e5d2861
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2673,8 +2673,10 @@ void ext4_read_inode(struct inode * inode)
*/
ei->i_extra_isize = le16_to_cpu(raw_inode->i_extra_isize);
if (EXT4_GOOD_OLD_INODE_SIZE + ei->i_extra_isize >
EXT4_INODE_SIZE(inode->i_sb))
EXT4_INODE_SIZE(inode->i_sb)) {
brelse (bh);
goto bad_inode;
}
if (ei->i_extra_isize == 0) {
/* The extra space is currently unused. Use it. */
ei->i_extra_isize = sizeof(struct ext4_inode) -
Expand Down

0 comments on commit e5d2861

Please sign in to comment.