Skip to contentSkip to conversation

memcg: fix section mismatch

PATCH In review Li Zefan 2 participants 3 messages Jan 14, 2009

Subsystems (2)
lore
Share & tools
lore

Li Zefan

author
#0 lore raw

PATCH v2 1/1 memcg: fix section mismatch

At system boot when creating the top cgroup, mem_cgroup_create() calls enable_swap_cgroup() which is marked as __init, so mark mem_cgroup_create() as __ref to avoid false section mismatch warning.

---

use __ref instead of __init_refok

---
 mm/memcontrol.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
mm/memcontrol.c +1 -1
index e2996b8..e57afca 100644
@@ -2181,7 +2181,7 @@ static void __init enable_swap_cgroup(void)
 }
 #endif
 
-static struct cgroup_subsys_state *
+static struct cgroup_subsys_state * __ref
 mem_cgroup_create(struct cgroup_subsys *ss, struct cgroup *cont)
 {
 	struct mem_cgroup *mem, *parent;
Signature · 1 line
1.5.4.rc3
#1 lore raw
Quoted 6 lines · On Wed, 14 Jan 2009 15:04:32 +0800 Li Zefan <[email protected]> wrote:

At system boot when creating the top cgroup, mem_cgroup_create() calls enable_swap_cgroup() which is marked as __init, so mark mem_cgroup_create() as __ref to avoid false section mismatch warning.

Acked-by; KAMEZAWA Hiroyuki <[email protected]>

Quoted 4 lines

---

use __ref instead of __init_refok

change log ?

Quoted 20 lines
---
 mm/memcontrol.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
mm/memcontrol.c +1 -1
index e2996b8..e57afca 100644
@@ -2181,7 +2181,7 @@ static void __init enable_swap_cgroup(void)
 }
 #endif
 
-static struct cgroup_subsys_state *
+static struct cgroup_subsys_state * __ref
 mem_cgroup_create(struct cgroup_subsys *ss, struct cgroup *cont)
 {
 	struct mem_cgroup *mem, *parent;
Signature · 1 line
1.5.4.rc3
author
#2 lore raw
Quoted 10 lines · KAMEZAWA Hiroyuki
Quoted 6 lines · On Wed, 14 Jan 2009 15:04:32 +0800 Li Zefan <[email protected]> wrote:

At system boot when creating the top cgroup, mem_cgroup_create() calls enable_swap_cgroup() which is marked as __init, so mark mem_cgroup_create() as __ref to avoid false section mismatch warning.

Quoted 8 lines

Acked-by; KAMEZAWA Hiroyuki <[email protected]>

Quoted 4 lines

---

use __ref instead of __init_refok

change log ?

Yes. But for this simple patch, I don't think change log for v1 -> v2 is worth anything for the normal changelog. :)