summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-01-24 13:15:37 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2020-01-25 11:31:59 -0500
commit587065dcac64e88132803cdb0a7f26bb4a79cf46 (patch)
tree3c263227d408a1fb08dca626df9beaf80db75671
parent76ed99d199f7b66b1f762392b19d115994d7e81b (diff)
fs/adfs: bigdir: Fix an error code in adfs_fplus_read()adfs
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: d79288b4f61b ("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>
-rw-r--r--fs/adfs/dir_fplus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/adfs/dir_fplus.c b/fs/adfs/dir_fplus.c
index 48ea299b6ece..4a15924014da 100644
--- a/fs/adfs/dir_fplus.c
+++ b/fs/adfs/dir_fplus.c
@@ -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;
}