Commit 587065dc authored by Dan Carpenter's avatar Dan Carpenter Committed by Al Viro

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: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Fixes: d79288b4 ("fs/adfs: bigdir: calculate and validate directory checkbyte")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 76ed99d1
...@@ -114,7 +114,8 @@ static int adfs_fplus_read(struct super_block *sb, u32 indaddr, ...@@ -114,7 +114,8 @@ static int adfs_fplus_read(struct super_block *sb, u32 indaddr,
return ret; return ret;
dir->bighead = h = (void *)dir->bhs[0]->b_data; 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); adfs_error(sb, "dir %06x has malformed header", indaddr);
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment