diff --git a/fs/hfs/super.c b/fs/hfs/super.c index 3bee9b5dba5e..02d78992eefd 100644 --- a/fs/hfs/super.c +++ b/fs/hfs/super.c @@ -354,6 +354,8 @@ static int hfs_fill_super(struct super_block *sb, struct fs_context *fc) goto bail_hfs_find; } hfs_bnode_read(fd.bnode, &rec, fd.entryoffset, fd.entrylength); + if (rec.type != HFS_CDR_DIR) + res = -EIO; } if (res) goto bail_hfs_find;