]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Btrfs: remove OPT_acl parse when acl disabled
authorGuangliang Zhao <lucienchao@gmail.com>
Mon, 12 May 2014 03:04:33 +0000 (11:04 +0800)
committerChris Mason <clm@fb.com>
Tue, 10 Jun 2014 00:20:50 +0000 (17:20 -0700)
Even CONFIG_BTRFS_FS_POSIX_ACL is not defined, the acl still could
been enabled using a mount option, and now fs/btrfs/acl.o is not
built, so the mount options will appear to be supported but will
be silently ignored.

Signed-off-by: Guangliang Zhao <lucienchao@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/super.c

index d80a2786f56366296e80b8f9d4795dbefa232525..77fcb57067009c75fa66b21fcc353d803c38f8f7 100644 (file)
@@ -580,8 +580,15 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
                        }
                        break;
                case Opt_acl:
+#ifdef CONFIG_BTRFS_FS_POSIX_ACL
                        root->fs_info->sb->s_flags |= MS_POSIXACL;
                        break;
+#else
+                       btrfs_err(root->fs_info,
+                               "support for ACL not compiled in!");
+                       ret = -EINVAL;
+                       goto out;
+#endif
                case Opt_noacl:
                        root->fs_info->sb->s_flags &= ~MS_POSIXACL;
                        break;