diff options
author | Yangtao Li <frank.li@vivo.com> | 2025-08-05 10:58:59 -0600 |
---|---|---|
committer | Viacheslav Dubeyko <slava@dubeyko.com> | 2025-08-31 18:07:59 -0700 |
commit | 9282bc905f0949fab8cf86c0f620ca988761254c (patch) | |
tree | 3138a2c0e3292e41dde64147b7b2e39edf9a9733 /fs | |
parent | 44fd3e4fc9cdd49c0db170459c3eed9977aae9e7 (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/hfsplus/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index 86351bdc8985..55f42b349a5e 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c @@ -524,7 +524,7 @@ static int hfsplus_fill_super(struct super_block *sb, struct fs_context *fc) if (!hfs_brec_read(&fd, &entry, sizeof(entry))) { hfs_find_exit(&fd); if (entry.type != cpu_to_be16(HFSPLUS_FOLDER)) { - err = -EINVAL; + err = -EIO; goto out_put_root; } inode = hfsplus_iget(sb, be32_to_cpu(entry.folder.id)); |