Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
58c025f0
Commit
58c025f0
authored
Dec 21, 2019
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgroup1: switch to use of errorfc() et.al.
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
bf45f7fc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
kernel/cgroup/cgroup-v1.c
kernel/cgroup/cgroup-v1.c
+12
-12
No files found.
kernel/cgroup/cgroup-v1.c
View file @
58c025f0
...
...
@@ -917,7 +917,7 @@ int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param)
ctx
->
subsys_mask
|=
(
1
<<
i
);
return
0
;
}
return
invalf
(
fc
,
"cgroup1:
Unknown subsys name '%s'"
,
param
->
key
);
return
invalf
c
(
fc
,
"
Unknown subsys name '%s'"
,
param
->
key
);
}
if
(
opt
<
0
)
return
opt
;
...
...
@@ -945,7 +945,7 @@ int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param)
case
Opt_release_agent
:
/* Specifying two release agents is forbidden */
if
(
ctx
->
release_agent
)
return
invalf
(
fc
,
"cgroup1:
release_agent respecified"
);
return
invalf
c
(
fc
,
"
release_agent respecified"
);
ctx
->
release_agent
=
param
->
string
;
param
->
string
=
NULL
;
break
;
...
...
@@ -955,9 +955,9 @@ int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param)
return
-
ENOENT
;
/* Can't specify an empty name */
if
(
!
param
->
size
)
return
invalf
(
fc
,
"cgroup1:
Empty name"
);
return
invalf
c
(
fc
,
"
Empty name"
);
if
(
param
->
size
>
MAX_CGROUP_ROOT_NAMELEN
-
1
)
return
invalf
(
fc
,
"cgroup1:
Name too long"
);
return
invalf
c
(
fc
,
"
Name too long"
);
/* Must match [\w.-]+ */
for
(
i
=
0
;
i
<
param
->
size
;
i
++
)
{
char
c
=
param
->
string
[
i
];
...
...
@@ -965,11 +965,11 @@ int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param)
continue
;
if
((
c
==
'.'
)
||
(
c
==
'-'
)
||
(
c
==
'_'
))
continue
;
return
invalf
(
fc
,
"cgroup1:
Invalid name"
);
return
invalf
c
(
fc
,
"
Invalid name"
);
}
/* Specifying two names is forbidden */
if
(
ctx
->
name
)
return
invalf
(
fc
,
"cgroup1:
name respecified"
);
return
invalf
c
(
fc
,
"
name respecified"
);
ctx
->
name
=
param
->
string
;
param
->
string
=
NULL
;
break
;
...
...
@@ -1004,7 +1004,7 @@ static int check_cgroupfs_options(struct fs_context *fc)
if
(
ctx
->
all_ss
)
{
/* Mutually exclusive option 'all' + subsystem name */
if
(
ctx
->
subsys_mask
)
return
invalf
(
fc
,
"cgroup1:
subsys name conflicts with all"
);
return
invalf
c
(
fc
,
"
subsys name conflicts with all"
);
/* 'all' => select all the subsystems */
ctx
->
subsys_mask
=
enabled
;
}
...
...
@@ -1014,7 +1014,7 @@ static int check_cgroupfs_options(struct fs_context *fc)
* empty hierarchies must have a name).
*/
if
(
!
ctx
->
subsys_mask
&&
!
ctx
->
name
)
return
invalf
(
fc
,
"cgroup1:
Need name or subsystem set"
);
return
invalf
c
(
fc
,
"
Need name or subsystem set"
);
/*
* Option noprefix was introduced just for backward compatibility
...
...
@@ -1022,11 +1022,11 @@ static int check_cgroupfs_options(struct fs_context *fc)
* the cpuset subsystem.
*/
if
((
ctx
->
flags
&
CGRP_ROOT_NOPREFIX
)
&&
(
ctx
->
subsys_mask
&
mask
))
return
invalf
(
fc
,
"cgroup1:
noprefix used incorrectly"
);
return
invalf
c
(
fc
,
"
noprefix used incorrectly"
);
/* Can't specify "none" and some subsystems */
if
(
ctx
->
subsys_mask
&&
ctx
->
none
)
return
invalf
(
fc
,
"cgroup1:
none used incorrectly"
);
return
invalf
c
(
fc
,
"
none used incorrectly"
);
return
0
;
}
...
...
@@ -1056,7 +1056,7 @@ int cgroup1_reconfigure(struct fs_context *fc)
/* Don't allow flags or name to change at remount */
if
((
ctx
->
flags
^
root
->
flags
)
||
(
ctx
->
name
&&
strcmp
(
ctx
->
name
,
root
->
name
)))
{
errorf
(
fc
,
"option or name mismatch, new: 0x%x
\"
%s
\"
, old: 0x%x
\"
%s
\"
"
,
errorf
c
(
fc
,
"option or name mismatch, new: 0x%x
\"
%s
\"
, old: 0x%x
\"
%s
\"
"
,
ctx
->
flags
,
ctx
->
name
?:
""
,
root
->
flags
,
root
->
name
);
ret
=
-
EINVAL
;
goto
out_unlock
;
...
...
@@ -1173,7 +1173,7 @@ static int cgroup1_root_to_use(struct fs_context *fc)
* can't create new one without subsys specification.
*/
if
(
!
ctx
->
subsys_mask
&&
!
ctx
->
none
)
return
invalf
(
fc
,
"cgroup1:
No subsys list or none specified"
);
return
invalf
c
(
fc
,
"
No subsys list or none specified"
);
/* Hierarchies may only be created in the initial cgroup namespace. */
if
(
ctx
->
ns
!=
&
init_cgroup_ns
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment