From: Kirill Korotaev Date: Sun, 24 Jun 2007 00:16:51 +0000 (-0700) Subject: ext4: lost brelse in ext4_read_inode() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e5d2861f31474b373ce7754dc5122b414a176c64;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ext4: lost brelse in ext4_read_inode() One of error path in ext4_read_inode() leaks bh since brelse is forgoten. Signed-off-by: Kirill Korotaev Acked-by: Vasily Averin Cc: Theodore Ts'o Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 0bcf62a750ff..8416fa28c422 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -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) -