]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/hfsplus/super.c
Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
[linux.git] / fs / hfsplus / super.c
index a6c0f54c48c30f25315865f8080d412fb428c00a..eb4535eba95d9a5e13dfda5fb196849a069bda64 100644 (file)
@@ -524,8 +524,10 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
                goto out_put_root;
        if (!hfs_brec_read(&fd, &entry, sizeof(entry))) {
                hfs_find_exit(&fd);
-               if (entry.type != cpu_to_be16(HFSPLUS_FOLDER))
+               if (entry.type != cpu_to_be16(HFSPLUS_FOLDER)) {
+                       err = -EINVAL;
                        goto out_put_root;
+               }
                inode = hfsplus_iget(sb, be32_to_cpu(entry.folder.id));
                if (IS_ERR(inode)) {
                        err = PTR_ERR(inode);
@@ -562,8 +564,8 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
                                goto out_put_hidden_dir;
                        }
 
-                       err = hfsplus_init_inode_security(sbi->hidden_dir,
-                                                               root, &str);
+                       err = hfsplus_init_security(sbi->hidden_dir,
+                                                       root, &str);
                        if (err == -EOPNOTSUPP)
                                err = 0; /* Operation is not supported. */
                        else if (err) {