Skip to content

Commit 587065d

Browse files
Dan CarpenterAl Viro
authored andcommitted
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 <[email protected]> Fixes: d79288b ("fs/adfs: bigdir: calculate and validate directory checkbyte") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent 76ed99d commit 587065d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/adfs/dir_fplus.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ static int adfs_fplus_read(struct super_block *sb, u32 indaddr,
114114
return ret;
115115

116116
dir->bighead = h = (void *)dir->bhs[0]->b_data;
117-
if (adfs_fplus_validate_header(h)) {
117+
ret = adfs_fplus_validate_header(h);
118+
if (ret) {
118119
adfs_error(sb, "dir %06x has malformed header", indaddr);
119120
goto out;
120121
}

0 commit comments

Comments
 (0)