2ed5dc03b286e07c34e320d29849bd8e01ee2863
[openwrt/staging/chunkeey.git] / target / linux / brcm2708 / patches-4.19 / 950-0430-Revert-cgroup-Disable-cgroup-memory-by-default.patch
1 From 95eef94518f050146820340787b2472db13c38ae Mon Sep 17 00:00:00 2001
2 From: P33M <p33m@github.com>
3 Date: Wed, 24 Apr 2019 14:25:09 +0100
4 Subject: [PATCH 430/725] Revert "cgroup: Disable cgroup "memory" by default"
5
6 This reverts commit cd6ce4d0ded13c94ff5208c679ed5e030263149b.
7 ---
8 kernel/cgroup/cgroup.c | 30 ------------------------------
9 1 file changed, 30 deletions(-)
10
11 --- a/kernel/cgroup/cgroup.c
12 +++ b/kernel/cgroup/cgroup.c
13 @@ -5296,8 +5296,6 @@ int __init cgroup_init_early(void)
14 }
15
16 static u16 cgroup_disable_mask __initdata;
17 -static u16 cgroup_enable_mask __initdata;
18 -static int __init cgroup_disable(char *str);
19
20 /**
21 * cgroup_init - cgroup initialization
22 @@ -5338,12 +5336,6 @@ int __init cgroup_init(void)
23
24 mutex_unlock(&cgroup_mutex);
25
26 - /* Apply an implicit disable... */
27 - cgroup_disable("memory");
28 -
29 - /* ...knowing that an explicit enable will override it. */
30 - cgroup_disable_mask &= ~cgroup_enable_mask;
31 -
32 for_each_subsys(ss, ssid) {
33 if (ss->early_init) {
34 struct cgroup_subsys_state *css =
35 @@ -5727,28 +5719,6 @@ static int __init cgroup_disable(char *s
36 }
37 __setup("cgroup_disable=", cgroup_disable);
38
39 -static int __init cgroup_enable(char *str)
40 -{
41 - struct cgroup_subsys *ss;
42 - char *token;
43 - int i;
44 -
45 - while ((token = strsep(&str, ",")) != NULL) {
46 - if (!*token)
47 - continue;
48 -
49 - for_each_subsys(ss, i) {
50 - if (strcmp(token, ss->name) &&
51 - strcmp(token, ss->legacy_name))
52 - continue;
53 -
54 - cgroup_enable_mask |= 1 << i;
55 - }
56 - }
57 - return 1;
58 -}
59 -__setup("cgroup_enable=", cgroup_enable);
60 -
61 /**
62 * css_tryget_online_from_dir - get corresponding css from a cgroup dentry
63 * @dentry: directory dentry of interest