aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorGuangliang Zhao <lucienchao@gmail.com>2014-05-11 23:04:33 -0400
committerChris Mason <clm@fb.com>2014-06-09 20:20:50 -0400
commit45ff35d6b9f301cbfb6b1703466ebe4431c7567f (patch)
tree132be574205b90ce90fd5ca723fa99f9914ddc19 /fs/btrfs/super.c
parentfaa2dbf004e89e8f7ccd28fbe6f07c308417b8ae (diff)
Btrfs: remove OPT_acl parse when acl disabled
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>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index d80a2786f563..77fcb5706700 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -580,8 +580,15 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
580 } 580 }
581 break; 581 break;
582 case Opt_acl: 582 case Opt_acl:
583#ifdef CONFIG_BTRFS_FS_POSIX_ACL
583 root->fs_info->sb->s_flags |= MS_POSIXACL; 584 root->fs_info->sb->s_flags |= MS_POSIXACL;
584 break; 585 break;
586#else
587 btrfs_err(root->fs_info,
588 "support for ACL not compiled in!");
589 ret = -EINVAL;
590 goto out;
591#endif
585 case Opt_noacl: 592 case Opt_noacl:
586 root->fs_info->sb->s_flags &= ~MS_POSIXACL; 593 root->fs_info->sb->s_flags &= ~MS_POSIXACL;
587 break; 594 break;