fs/adfs: bigdir: Fix an error code in adfs_fplus_read()

This code accidentally returns success, but it should return the
-EIO error code from adfs_fplus_validate_header().

Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Fixes: d79288b4f6 ("fs/adfs: bigdir: calculate and validate directory checkbyte")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Dan Carpenter 2020-01-24 13:15:37 +03:00 committed by Al Viro
parent 76ed99d199
commit 587065dcac

View File

@ -114,7 +114,8 @@ static int adfs_fplus_read(struct super_block *sb, u32 indaddr,
return ret;
dir->bighead = h = (void *)dir->bhs[0]->b_data;
if (adfs_fplus_validate_header(h)) {
ret = adfs_fplus_validate_header(h);
if (ret) {
adfs_error(sb, "dir %06x has malformed header", indaddr);
goto out;
}