FOREACH_DIRENT(de, d, return -errno) {
_cleanup_free_ char *path = NULL;
- unsigned int limit;
+ unsigned long long limit_bytes;
if (de->d_type != DT_DIR)
continue;
if (ret < 0)
return -ENOMEM;
- ret = cgroup_read_node_uint32(path, MEMCG_LIMIT_BYTE, &limit);
- if (ret != RESOURCED_ERROR_NONE ||limit <= 0)
+ ret = cgroup_read_node_ulonglong(path, MEMCG_LIMIT_BYTE, &limit_bytes);
+ if (ret != RESOURCED_ERROR_NONE ||limit_bytes <= 0)
continue;
if (changeswappiness >= 0) {
MEMCG_SWAPPINESS, changeswappiness, path);
}
- lowmem_reassign_limit(path, limit, PROC_ACTION_KILL);
+ lowmem_reassign_limit(path, limit_bytes, PROC_ACTION_KILL);
}
return RESOURCED_ERROR_NONE;
}