Skip to contentSkip to conversation

Btrfs: remove OPT_acl parse when acl disabled

PATCH New Guangliang Zhao 1 participant 1 message May 12, 2014 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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.

---

V2: return -EINVAL when ACL didn't complied in

 fs/btrfs/super.c |    7 +++++++
 1 file changed, 7 insertions(+)
fs/btrfs/super.c +7 -0
index 363404b..1046e66 100644
@@ -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;
Signature · 1 line
1.7.9.5