[PATCH 4/7] ext4: lost brelse in ext4_xattr_get_block()

From: Vasily Averin
Date: Wed Oct 31 2018 - 15:12:49 EST


Fixes dec214d00e0d ("ext4: xattr inode deduplication") # 4.13

Signed-off-by: Vasily Averin <vvs@xxxxxxxxxxxxx>
---
fs/ext4/xattr.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index dc1aeab06dba..07c3a115f7ae 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -2272,8 +2272,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;
}

--
2.17.1