[PATCH] ext2: add missing brelse() in ext2_iget()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add missing brelse() on error path of ext2_iget().

Signed-off-by: Chengguang Xu <cgxu519@xxxxxxxxxxx>
---
 fs/ext2/inode.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index e474127dd255..fb3611f02051 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -1473,6 +1473,7 @@ struct inode *ext2_iget (struct super_block *sb, unsigned long ino)
 	else
 		ei->i_dir_acl = le32_to_cpu(raw_inode->i_dir_acl);
 	if (i_size_read(inode) < 0) {
+		brelse(bh);
 		ret = -EFSCORRUPTED;
 		goto bad_inode;
 	}
-- 
2.21.0






[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux