Skip to content

Commit

Permalink
Btrfs: remove OPT_acl parse when acl disabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Guangliang Zhao authored and Chris Mason committed Jun 10, 2014
1 parent faa2dbf commit 45ff35d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fs/btrfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 45ff35d

Please sign in to comment.