Skip to content

Commit 58c025f

Browse files
author
Al Viro
committed
cgroup1: switch to use of errorfc() et.al.
Signed-off-by: Al Viro <[email protected]>
1 parent bf45f7f commit 58c025f

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

kernel/cgroup/cgroup-v1.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param)
917917
ctx->subsys_mask |= (1 << i);
918918
return 0;
919919
}
920-
return invalf(fc, "cgroup1: Unknown subsys name '%s'", param->key);
920+
return invalfc(fc, "Unknown subsys name '%s'", param->key);
921921
}
922922
if (opt < 0)
923923
return opt;
@@ -945,7 +945,7 @@ int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param)
945945
case Opt_release_agent:
946946
/* Specifying two release agents is forbidden */
947947
if (ctx->release_agent)
948-
return invalf(fc, "cgroup1: release_agent respecified");
948+
return invalfc(fc, "release_agent respecified");
949949
ctx->release_agent = param->string;
950950
param->string = NULL;
951951
break;
@@ -955,21 +955,21 @@ int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param)
955955
return -ENOENT;
956956
/* Can't specify an empty name */
957957
if (!param->size)
958-
return invalf(fc, "cgroup1: Empty name");
958+
return invalfc(fc, "Empty name");
959959
if (param->size > MAX_CGROUP_ROOT_NAMELEN - 1)
960-
return invalf(fc, "cgroup1: Name too long");
960+
return invalfc(fc, "Name too long");
961961
/* Must match [\w.-]+ */
962962
for (i = 0; i < param->size; i++) {
963963
char c = param->string[i];
964964
if (isalnum(c))
965965
continue;
966966
if ((c == '.') || (c == '-') || (c == '_'))
967967
continue;
968-
return invalf(fc, "cgroup1: Invalid name");
968+
return invalfc(fc, "Invalid name");
969969
}
970970
/* Specifying two names is forbidden */
971971
if (ctx->name)
972-
return invalf(fc, "cgroup1: name respecified");
972+
return invalfc(fc, "name respecified");
973973
ctx->name = param->string;
974974
param->string = NULL;
975975
break;
@@ -1004,7 +1004,7 @@ static int check_cgroupfs_options(struct fs_context *fc)
10041004
if (ctx->all_ss) {
10051005
/* Mutually exclusive option 'all' + subsystem name */
10061006
if (ctx->subsys_mask)
1007-
return invalf(fc, "cgroup1: subsys name conflicts with all");
1007+
return invalfc(fc, "subsys name conflicts with all");
10081008
/* 'all' => select all the subsystems */
10091009
ctx->subsys_mask = enabled;
10101010
}
@@ -1014,19 +1014,19 @@ static int check_cgroupfs_options(struct fs_context *fc)
10141014
* empty hierarchies must have a name).
10151015
*/
10161016
if (!ctx->subsys_mask && !ctx->name)
1017-
return invalf(fc, "cgroup1: Need name or subsystem set");
1017+
return invalfc(fc, "Need name or subsystem set");
10181018

10191019
/*
10201020
* Option noprefix was introduced just for backward compatibility
10211021
* with the old cpuset, so we allow noprefix only if mounting just
10221022
* the cpuset subsystem.
10231023
*/
10241024
if ((ctx->flags & CGRP_ROOT_NOPREFIX) && (ctx->subsys_mask & mask))
1025-
return invalf(fc, "cgroup1: noprefix used incorrectly");
1025+
return invalfc(fc, "noprefix used incorrectly");
10261026

10271027
/* Can't specify "none" and some subsystems */
10281028
if (ctx->subsys_mask && ctx->none)
1029-
return invalf(fc, "cgroup1: none used incorrectly");
1029+
return invalfc(fc, "none used incorrectly");
10301030

10311031
return 0;
10321032
}
@@ -1056,7 +1056,7 @@ int cgroup1_reconfigure(struct fs_context *fc)
10561056
/* Don't allow flags or name to change at remount */
10571057
if ((ctx->flags ^ root->flags) ||
10581058
(ctx->name && strcmp(ctx->name, root->name))) {
1059-
errorf(fc, "option or name mismatch, new: 0x%x \"%s\", old: 0x%x \"%s\"",
1059+
errorfc(fc, "option or name mismatch, new: 0x%x \"%s\", old: 0x%x \"%s\"",
10601060
ctx->flags, ctx->name ?: "", root->flags, root->name);
10611061
ret = -EINVAL;
10621062
goto out_unlock;
@@ -1173,7 +1173,7 @@ static int cgroup1_root_to_use(struct fs_context *fc)
11731173
* can't create new one without subsys specification.
11741174
*/
11751175
if (!ctx->subsys_mask && !ctx->none)
1176-
return invalf(fc, "cgroup1: No subsys list or none specified");
1176+
return invalfc(fc, "No subsys list or none specified");
11771177

11781178
/* Hierarchies may only be created in the initial cgroup namespace. */
11791179
if (ctx->ns != &init_cgroup_ns)

0 commit comments

Comments
 (0)