diff options
| author | Yangtao Li <frank.li@vivo.com> | 2025-08-05 10:58:59 -0600 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-10-29 14:10:16 +0100 |
| commit | c99e5f16251ad1755a3b6ffd7061ee37c6095ff4 (patch) | |
| tree | 7782555568043fafc23f090c85f9ba5899ea150f /fs | |
| parent | 502fa92a71f344611101bd04ef1a595b8b6014f5 (diff) | |
| download | linux-c99e5f16251ad1755a3b6ffd7061ee37c6095ff4.tar.gz linux-c99e5f16251ad1755a3b6ffd7061ee37c6095ff4.tar.bz2 linux-c99e5f16251ad1755a3b6ffd7061ee37c6095ff4.zip | |
hfsplus: return EIO when type of hidden directory mismatch in hfsplus_fill_super()
[ Upstream commit 9282bc905f0949fab8cf86c0f620ca988761254c ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
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 2f215d1daf6d..77ec048021a0 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c @@ -537,7 +537,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)); |
