Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
6782b4b2
Unverified
Commit
6782b4b2
authored
Dec 08, 2019
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgroups/cgfsng: rework cgfsng_setup_limits_legacy()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
b4113388
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
cgfsng.c
src/lxc/cgroups/cgfsng.c
+15
-9
No files found.
src/lxc/cgroups/cgfsng.c
View file @
6782b4b2
...
@@ -2664,11 +2664,18 @@ __cgfsng_ops static bool cgfsng_setup_limits_legacy(struct cgroup_ops *ops,
...
@@ -2664,11 +2664,18 @@ __cgfsng_ops static bool cgfsng_setup_limits_legacy(struct cgroup_ops *ops,
struct
lxc_cgroup
*
cg
;
struct
lxc_cgroup
*
cg
;
bool
ret
=
false
;
bool
ret
=
false
;
if
(
!
ops
)
return
ret_set_errno
(
false
,
ENOENT
);
if
(
!
conf
)
return
ret_set_errno
(
false
,
EINVAL
);
cgroup_settings
=
&
conf
->
cgroup
;
if
(
lxc_list_empty
(
cgroup_settings
))
if
(
lxc_list_empty
(
cgroup_settings
))
return
true
;
return
true
;
if
(
!
ops
->
hierarchies
)
if
(
!
ops
->
hierarchies
)
return
false
;
return
ret_set_errno
(
false
,
EINVAL
)
;
sorted_cgroup_settings
=
sort_cgroup_settings
(
cgroup_settings
);
sorted_cgroup_settings
=
sort_cgroup_settings
(
cgroup_settings
);
if
(
!
sorted_cgroup_settings
)
if
(
!
sorted_cgroup_settings
)
...
@@ -2679,14 +2686,13 @@ __cgfsng_ops static bool cgfsng_setup_limits_legacy(struct cgroup_ops *ops,
...
@@ -2679,14 +2686,13 @@ __cgfsng_ops static bool cgfsng_setup_limits_legacy(struct cgroup_ops *ops,
if
(
do_devices
==
!
strncmp
(
"devices"
,
cg
->
subsystem
,
7
))
{
if
(
do_devices
==
!
strncmp
(
"devices"
,
cg
->
subsystem
,
7
))
{
if
(
cg_legacy_set_data
(
ops
,
cg
->
subsystem
,
cg
->
value
))
{
if
(
cg_legacy_set_data
(
ops
,
cg
->
subsystem
,
cg
->
value
))
{
if
(
do_devices
&&
(
errno
==
EACCES
||
errno
==
EPERM
))
{
if
(
do_devices
&&
(
errno
==
EACCES
||
errno
==
EPERM
))
WARN
(
"Failed to set
\"
%s
\"
to
\"
%s
\"
"
,
log_warn_errno
(
continue
,
cg
->
subsystem
,
cg
->
value
);
errno
,
"Failed to set
\"
%s
\"
to
\"
%s
\"
"
,
continue
;
cg
->
subsystem
,
cg
->
value
);
}
log_warn_errno
(
goto
out
,
errno
,
WARN
(
"Failed to set
\"
%s
\"
to
\"
%s
\"
"
,
"Failed to set
\"
%s
\"
to
\"
%s
\"
"
,
cg
->
subsystem
,
cg
->
value
);
cg
->
subsystem
,
cg
->
value
);
goto
out
;
}
}
DEBUG
(
"Set controller
\"
%s
\"
set to
\"
%s
\"
"
,
DEBUG
(
"Set controller
\"
%s
\"
set to
\"
%s
\"
"
,
cg
->
subsystem
,
cg
->
value
);
cg
->
subsystem
,
cg
->
value
);
...
...
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