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
362bcc43
Unverified
Commit
362bcc43
authored
Dec 08, 2019
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgroups/cgfsng: rework cgfsng_mount()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
48ee0f07
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
cgfsng.c
src/lxc/cgroups/cgfsng.c
+10
-4
No files found.
src/lxc/cgroups/cgfsng.c
View file @
362bcc43
...
@@ -1783,9 +1783,15 @@ __cgfsng_ops static bool cgfsng_mount(struct cgroup_ops *ops,
...
@@ -1783,9 +1783,15 @@ __cgfsng_ops static bool cgfsng_mount(struct cgroup_ops *ops,
int
ret
;
int
ret
;
bool
has_cgns
=
false
,
retval
=
false
,
wants_force_mount
=
false
;
bool
has_cgns
=
false
,
retval
=
false
,
wants_force_mount
=
false
;
if
(
!
ops
)
return
ret_set_errno
(
false
,
ENOENT
);
if
(
!
ops
->
hierarchies
)
if
(
!
ops
->
hierarchies
)
return
true
;
return
true
;
if
(
!
handler
||
!
handler
->
conf
)
return
ret_set_errno
(
false
,
EINVAL
);
if
((
type
&
LXC_AUTO_CGROUP_MASK
)
==
0
)
if
((
type
&
LXC_AUTO_CGROUP_MASK
)
==
0
)
return
true
;
return
true
;
...
@@ -1845,10 +1851,10 @@ __cgfsng_ops static bool cgfsng_mount(struct cgroup_ops *ops,
...
@@ -1845,10 +1851,10 @@ __cgfsng_ops static bool cgfsng_mount(struct cgroup_ops *ops,
continue
;
continue
;
ret
=
mkdir
(
controllerpath
,
0755
);
ret
=
mkdir
(
controllerpath
,
0755
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
SYSERROR
(
"Error creating cgroup path: %s"
,
controllerpath
);
log_error_errno
(
goto
on_error
,
errno
,
goto
on_error
;
"Error creating cgroup path: %s"
,
}
controllerpath
);
if
(
has_cgns
&&
wants_force_mount
)
{
if
(
has_cgns
&&
wants_force_mount
)
{
/* If cgroup namespaces are supported but the container
/* If cgroup namespaces are supported but the container
...
...
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