Skip to content

Commit 9282bc9

Browse files
bbkzzdubeyko
authored andcommitted
hfsplus: return EIO when type of hidden directory mismatch in hfsplus_fill_super()
If Catalog File contains corrupted record for the case of hidden directory's type, regard it as I/O error instead of Invalid argument. Signed-off-by: Yangtao Li <[email protected]> Reviewed-by: Viacheslav Dubeyko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Viacheslav Dubeyko <[email protected]>
1 parent 44fd3e4 commit 9282bc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/hfsplus/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ static int hfsplus_fill_super(struct super_block *sb, struct fs_context *fc)
524524
if (!hfs_brec_read(&fd, &entry, sizeof(entry))) {
525525
hfs_find_exit(&fd);
526526
if (entry.type != cpu_to_be16(HFSPLUS_FOLDER)) {
527-
err = -EINVAL;
527+
err = -EIO;
528528
goto out_put_root;
529529
}
530530
inode = hfsplus_iget(sb, be32_to_cpu(entry.folder.id));

0 commit comments

Comments
 (0)