pointless alias for invalf()...
Unified · Split
| @@ -18,8 +18,6 @@ · 17 unmodified lines | |||
| 18 | 18 | ||
| 19 | #include <trace/events/cgroup.h> | 19 | #include <trace/events/cgroup.h> |
| 20 | 20 | ||
| 21 | #define cg_invalf(fc, fmt, ...) invalf(fc, fmt, ## __VA_ARGS__) | ||
| 22 | |||
| 23 | /* | 21 | /* |
| 24 | * pidlists linger the following amount before being destroyed. The goal | 22 | * pidlists linger the following amount before being destroyed. The goal |
| 25 | * is avoiding frequent destruction in the middle of consecutive read calls | 23 | * is avoiding frequent destruction in the middle of consecutive read calls |
| @@ -924,7 +922,7 @@ int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param) · 898 unmodified lines | |||
| 924 | ctx->subsys_mask |= (1 << i); | 922 | ctx->subsys_mask |= (1 << i); |
| 925 | return 0; | 923 | return 0; |
| 926 | } | 924 | } |
| 927 | return cg_invalf(fc, "cgroup1: Unknown subsys name '%s'", param->key); | 925 | return invalf(fc, "cgroup1: Unknown subsys name '%s'", param->key); |
| 928 | } | 926 | } |
| 929 | if (opt < 0) | 927 | if (opt < 0) |
| 930 | return opt; | 928 | return opt; |
| @@ -952,7 +950,7 @@ int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param) · 21 unmodified lines | |||
| 952 | case Opt_release_agent: | 950 | case Opt_release_agent: |
| 953 | /* Specifying two release agents is forbidden */ | 951 | /* Specifying two release agents is forbidden */ |
| 954 | if (ctx->release_agent) | 952 | if (ctx->release_agent) |
| 955 | return cg_invalf(fc, "cgroup1: release_agent respecified"); | 953 | return invalf(fc, "cgroup1: release_agent respecified"); |
| 956 | ctx->release_agent = param->string; | 954 | ctx->release_agent = param->string; |
| 957 | param->string = NULL; | 955 | param->string = NULL; |
| 958 | break; | 956 | break; |
| @@ -962,9 +960,9 @@ int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param) · 3 unmodified lines | |||
| 962 | return -ENOENT; | 960 | return -ENOENT; |
| 963 | /* Can't specify an empty name */ | 961 | /* Can't specify an empty name */ |
| 964 | if (!param->size) | 962 | if (!param->size) |
| 965 | return cg_invalf(fc, "cgroup1: Empty name"); | 963 | return invalf(fc, "cgroup1: Empty name"); |
| 966 | if (param->size > MAX_CGROUP_ROOT_NAMELEN - 1) | 964 | if (param->size > MAX_CGROUP_ROOT_NAMELEN - 1) |
| 967 | return cg_invalf(fc, "cgroup1: Name too long"); | 965 | return invalf(fc, "cgroup1: Name too long"); |
| 968 | /* Must match [\w.-]+ */ | 966 | /* Must match [\w.-]+ */ |
| 969 | for (i = 0; i < param->size; i++) { | 967 | for (i = 0; i < param->size; i++) { |
| 970 | char c = param->string[i]; | 968 | char c = param->string[i]; |
| @@ -972,11 +970,11 @@ int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param) · 1 unmodified line | |||
| 972 | continue; | 970 | continue; |
| 973 | if ((c == '.') || (c == '-') || (c == '_')) | 971 | if ((c == '.') || (c == '-') || (c == '_')) |
| 974 | continue; | 972 | continue; |
| 975 | return cg_invalf(fc, "cgroup1: Invalid name"); | 973 | return invalf(fc, "cgroup1: Invalid name"); |
| 976 | } | 974 | } |
| 977 | /* Specifying two names is forbidden */ | 975 | /* Specifying two names is forbidden */ |
| 978 | if (ctx->name) | 976 | if (ctx->name) |
| 979 | return cg_invalf(fc, "cgroup1: name respecified"); | 977 | return invalf(fc, "cgroup1: name respecified"); |
| 980 | ctx->name = param->string; | 978 | ctx->name = param->string; |
| 981 | param->string = NULL; | 979 | param->string = NULL; |
| 982 | break; | 980 | break; |
| @@ -1011,7 +1009,7 @@ static int check_cgroupfs_options(struct fs_context *fc) · 28 unmodified lines | |||
| 1011 | if (ctx->all_ss) { | 1009 | if (ctx->all_ss) { |
| 1012 | /* Mutually exclusive option 'all' + subsystem name */ | 1010 | /* Mutually exclusive option 'all' + subsystem name */ |
| 1013 | if (ctx->subsys_mask) | 1011 | if (ctx->subsys_mask) |
| 1014 | return cg_invalf(fc, "cgroup1: subsys name conflicts with all"); | 1012 | return invalf(fc, "cgroup1: subsys name conflicts with all"); |
| 1015 | /* 'all' => select all the subsystems */ | 1013 | /* 'all' => select all the subsystems */ |
| 1016 | ctx->subsys_mask = enabled; | 1014 | ctx->subsys_mask = enabled; |
| 1017 | } | 1015 | } |
| @@ -1021,7 +1019,7 @@ static int check_cgroupfs_options(struct fs_context *fc) · 3 unmodified lines | |||
| 1021 | * empty hierarchies must have a name). | 1019 | * empty hierarchies must have a name). |
| 1022 | */ | 1020 | */ |
| 1023 | if (!ctx->subsys_mask && !ctx->name) | 1021 | if (!ctx->subsys_mask && !ctx->name) |
| 1024 | return cg_invalf(fc, "cgroup1: Need name or subsystem set"); | 1022 | return invalf(fc, "cgroup1: Need name or subsystem set"); |
| 1025 | 1023 | ||
| 1026 | /* | 1024 | /* |
| 1027 | * Option noprefix was introduced just for backward compatibility | 1025 | * Option noprefix was introduced just for backward compatibility |
| @@ -1029,11 +1027,11 @@ static int check_cgroupfs_options(struct fs_context *fc) · 1 unmodified line | |||
| 1029 | * the cpuset subsystem. | 1027 | * the cpuset subsystem. |
| 1030 | */ | 1028 | */ |
| 1031 | if ((ctx->flags & CGRP_ROOT_NOPREFIX) && (ctx->subsys_mask & mask)) | 1029 | if ((ctx->flags & CGRP_ROOT_NOPREFIX) && (ctx->subsys_mask & mask)) |
| 1032 | return cg_invalf(fc, "cgroup1: noprefix used incorrectly"); | 1030 | return invalf(fc, "cgroup1: noprefix used incorrectly"); |
| 1033 | 1031 | ||
| 1034 | /* Can't specify "none" and some subsystems */ | 1032 | /* Can't specify "none" and some subsystems */ |
| 1035 | if (ctx->subsys_mask && ctx->none) | 1033 | if (ctx->subsys_mask && ctx->none) |
| 1036 | return cg_invalf(fc, "cgroup1: none used incorrectly"); | 1034 | return invalf(fc, "cgroup1: none used incorrectly"); |
| 1037 | 1035 | ||
| 1038 | return 0; | 1036 | return 0; |
| 1039 | } | 1037 | } |
| @@ -1063,7 +1061,7 @@ int cgroup1_reconfigure(struct fs_context *fc) · 23 unmodified lines | |||
| 1063 | /* Don't allow flags or name to change at remount */ | 1061 | /* Don't allow flags or name to change at remount */ |
| 1064 | if ((ctx->flags ^ root->flags) || | 1062 | if ((ctx->flags ^ root->flags) || |
| 1065 | (ctx->name && strcmp(ctx->name, root->name))) { | 1063 | (ctx->name && strcmp(ctx->name, root->name))) { |
| 1066 | cg_invalf(fc, "option or name mismatch, new: 0x%x \"%s\", old: 0x%x \"%s\"", | 1064 | errorf(fc, "option or name mismatch, new: 0x%x \"%s\", old: 0x%x \"%s\"", |
| 1067 | ctx->flags, ctx->name ?: "", root->flags, root->name); | 1065 | ctx->flags, ctx->name ?: "", root->flags, root->name); |
| 1068 | ret = -EINVAL; | 1066 | ret = -EINVAL; |
| 1069 | goto out_unlock; | 1067 | goto out_unlock; |
| @@ -1180,7 +1178,7 @@ static int cgroup1_root_to_use(struct fs_context *fc) · 110 unmodified lines | |||
| 1180 | * can't create new one without subsys specification. | 1178 | * can't create new one without subsys specification. |
| 1181 | */ | 1179 | */ |
| 1182 | if (!ctx->subsys_mask && !ctx->none) | 1180 | if (!ctx->subsys_mask && !ctx->none) |
| 1183 | return cg_invalf(fc, "cgroup1: No subsys list or none specified"); | 1181 | return invalf(fc, "cgroup1: No subsys list or none specified"); |
| 1184 | 1182 | ||
| 1185 | /* Hierarchies may only be created in the initial cgroup namespace. */ | 1183 | /* Hierarchies may only be created in the initial cgroup namespace. */ |
| 1186 | if (ctx->ns != &init_cgroup_ns) | 1184 | if (ctx->ns != &init_cgroup_ns) |