ext2: add missing brelse() in ext2_iget()
authorChengguang Xu <cgxu519@zoho.com.cn>
Sun, 16 Jun 2019 15:08:01 +0000 (23:08 +0800)
committerJan Kara <jack@suse.cz>
Wed, 19 Jun 2019 16:27:38 +0000 (18:27 +0200)
Add missing brelse() on error path of ext2_iget().

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Chengguang Xu <cgxu519@zoho.com.cn>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/ext2/inode.c

index 8d91f5dab0dcce01f9b8916244c197e4efa2a0a2..e680478866db92e1e7b30e51467e0545034b3016 100644 (file)
@@ -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;
        }