Commit e5d2861f authored by Kirill Korotaev's avatar Kirill Korotaev Committed by Linus Torvalds

ext4: lost brelse in ext4_read_inode()

One of error path in ext4_read_inode() leaks bh since brelse is forgoten.
Signed-off-by: default avatarKirill Korotaev <dev@openvz.org>
Acked-by: default avatarVasily Averin <vvs@sw.ru>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e4a10a36
...@@ -2673,8 +2673,10 @@ void ext4_read_inode(struct inode * inode) ...@@ -2673,8 +2673,10 @@ void ext4_read_inode(struct inode * inode)
*/ */
ei->i_extra_isize = le16_to_cpu(raw_inode->i_extra_isize); ei->i_extra_isize = le16_to_cpu(raw_inode->i_extra_isize);
if (EXT4_GOOD_OLD_INODE_SIZE + ei->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; goto bad_inode;
}
if (ei->i_extra_isize == 0) { if (ei->i_extra_isize == 0) {
/* The extra space is currently unused. Use it. */ /* The extra space is currently unused. Use it. */
ei->i_extra_isize = sizeof(struct ext4_inode) - ei->i_extra_isize = sizeof(struct ext4_inode) -
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment