diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 34975e1aa7d2..3e6f326c3480 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -2281,8 +2281,10 @@ static struct buffer_head *ext4_xattr_get_block(struct inode *inode) if (!bh) return ERR_PTR(-EIO); error = ext4_xattr_check_block(inode, bh); - if (error) + if (error) { + brelse(bh); return ERR_PTR(error); + } return bh; }