Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <frank.li@vivo.com>
Reviewed-by: Viacheslav Dubeyko <slava@dubeyko.com>
Link: https://lore.kernel.org/r/20250805165905.3390154-1-frank.li@vivo.com
Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>

authored by

Yangtao Li and committed by
Viacheslav Dubeyko
9282bc90 44fd3e4f

+1 -1
+1 -1
fs/hfsplus/super.c
··· 524 524 if (!hfs_brec_read(&fd, &entry, sizeof(entry))) { 525 525 hfs_find_exit(&fd); 526 526 if (entry.type != cpu_to_be16(HFSPLUS_FOLDER)) { 527 - err = -EINVAL; 527 + err = -EIO; 528 528 goto out_put_root; 529 529 } 530 530 inode = hfsplus_iget(sb, be32_to_cpu(entry.folder.id));