[PATCH v2] ext4: lost brelse in __ext4_read_dirblock()

From: Vasily Averin
Date: Wed Nov 07 2018 - 12:30:24 EST


Fixes dc6982ff4db1 ("ext4: refactor code to read directory blocks ...")
Cc: stable@xxxxxxxxxx # 3.9

Signed-off-by: Vasily Averin <vvs@xxxxxxxxxxxxx>
---
fs/ext4/namei.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index d388cce72db2..6a6b90363ef1 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -126,6 +126,7 @@ static struct buffer_head *__ext4_read_dirblock(struct inode *inode,
if (!is_dx_block && type == INDEX) {
ext4_error_inode(inode, func, line, block,
"directory leaf block found instead of index block");
+ brelse(bh);
return ERR_PTR(-EFSCORRUPTED);
}
if (!ext4_has_metadata_csum(inode->i_sb) ||
--
2.17.1