chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
networkd: add basic dbus API
[elogind.git]
/
src
/
core
/
cgroup.c
diff --git
a/src/core/cgroup.c
b/src/core/cgroup.c
index d6156c3924dbc8c281669d328e3bd2efc6ef1719..10fdcc9984e39f4a5171c77d68c750d7b7d3d490 100644
(file)
--- a/
src/core/cgroup.c
+++ b/
src/core/cgroup.c
@@
-292,7
+292,7
@@
void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const cha
if (mask == 0)
return;
if (mask == 0)
return;
- /* Some cgroup attributes are not support on the root cgroup,
+ /* Some cgroup attributes are not support
ed
on the root cgroup,
* hence silently ignore */
is_root = isempty(path) || path_equal(path, "/");
if (is_root)
* hence silently ignore */
is_root = isempty(path) || path_equal(path, "/");
if (is_root)
@@
-380,7
+380,7
@@
void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const cha
}
}
}
}
- if (
mask & CGROUP_MEMORY
) {
+ if (
(mask & CGROUP_MEMORY) && !is_root
) {
if (c->memory_limit != (uint64_t) -1) {
char buf[DECIMAL_STR_MAX(uint64_t) + 1];
if (c->memory_limit != (uint64_t) -1) {
char buf[DECIMAL_STR_MAX(uint64_t) + 1];
@@
-954,7
+954,7
@@
int manager_setup_cgroup(Manager *m) {
if (m->pin_cgroupfs_fd < 0)
return log_error_errno(errno, "Failed to open pin file: %m");
if (m->pin_cgroupfs_fd < 0)
return log_error_errno(errno, "Failed to open pin file: %m");
- /* 6. Always enable hierarchial support if it exists... */
+ /* 6. Always enable hierarchi
c
al support if it exists... */
cg_set_attribute("memory", "/", "memory.use_hierarchy", "1");
}
cg_set_attribute("memory", "/", "memory.use_hierarchy", "1");
}