diff --git a/fs/hfs/super.c b/fs/hfs/super.c index a4f2a2bfa6d3..2e52acf282b0 100644 --- a/fs/hfs/super.c +++ b/fs/hfs/super.c @@ -361,7 +361,7 @@ 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) + if (rec.type != HFS_CDR_DIR || rec.dir.DirID != cpu_to_be32(HFS_ROOT_CNID)) res = -EIO; } if (res)