diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2020-01-24 11:15:37 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2020-01-25 17:31:59 +0100 |
commit | 587065dcac64e88132803cdb0a7f26bb4a79cf46 (patch) | |
tree | 3c263227d408a1fb08dca626df9beaf80db75671 /fs/adfs | |
parent | Documentation: update adfs filesystem documentation (diff) | |
download | linux-587065dcac64e88132803cdb0a7f26bb4a79cf46.tar.xz linux-587065dcac64e88132803cdb0a7f26bb4a79cf46.zip |
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: 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>
Diffstat (limited to 'fs/adfs')
-rw-r--r-- | fs/adfs/dir_fplus.c | 3 |
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; } |