diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-20 21:11:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-20 21:11:21 -0400 |
commit | 0d9cabdccedb79ee5f27b77ff51f29a9e7d23275 (patch) | |
tree | 8bfb64c3672d058eb90aec3c3a9c4f61cef9097c /net/core | |
parent | 701085b219016d38f105b031381b9cee6200253a (diff) | |
parent | 3ce3230a0cff484e5130153f244d4fb8a56b3a8b (diff) |
Merge branch 'for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup changes from Tejun Heo:
"Out of the 8 commits, one fixes a long-standing locking issue around
tasklist walking and others are cleanups."
* 'for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
cgroup: Walk task list under tasklist_lock in cgroup_enable_task_cg_list
cgroup: Remove wrong comment on cgroup_enable_task_cg_list()
cgroup: remove cgroup_subsys argument from callbacks
cgroup: remove extra calls to find_existing_css_set
cgroup: replace tasklist_lock with rcu_read_lock
cgroup: simplify double-check locking in cgroup_attach_proc
cgroup: move struct cgroup_pidlist out from the header file
cgroup: remove cgroup_attach_task_current_cg()
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/netprio_cgroup.c | 10 | ||||
-rw-r--r-- | net/core/sock.c | 6 |
2 files changed, 7 insertions, 9 deletions
diff --git a/net/core/netprio_cgroup.c b/net/core/netprio_cgroup.c index 4dacc44637ef..ba6900f73900 100644 --- a/net/core/netprio_cgroup.c +++ b/net/core/netprio_cgroup.c | |||
@@ -23,9 +23,8 @@ | |||
23 | #include <net/sock.h> | 23 | #include <net/sock.h> |
24 | #include <net/netprio_cgroup.h> | 24 | #include <net/netprio_cgroup.h> |
25 | 25 | ||
26 | static struct cgroup_subsys_state *cgrp_create(struct cgroup_subsys *ss, | 26 | static struct cgroup_subsys_state *cgrp_create(struct cgroup *cgrp); |
27 | struct cgroup *cgrp); | 27 | static void cgrp_destroy(struct cgroup *cgrp); |
28 | static void cgrp_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp); | ||
29 | static int cgrp_populate(struct cgroup_subsys *ss, struct cgroup *cgrp); | 28 | static int cgrp_populate(struct cgroup_subsys *ss, struct cgroup *cgrp); |
30 | 29 | ||
31 | struct cgroup_subsys net_prio_subsys = { | 30 | struct cgroup_subsys net_prio_subsys = { |
@@ -121,8 +120,7 @@ static void update_netdev_tables(void) | |||
121 | rtnl_unlock(); | 120 | rtnl_unlock(); |
122 | } | 121 | } |
123 | 122 | ||
124 | static struct cgroup_subsys_state *cgrp_create(struct cgroup_subsys *ss, | 123 | static struct cgroup_subsys_state *cgrp_create(struct cgroup *cgrp) |
125 | struct cgroup *cgrp) | ||
126 | { | 124 | { |
127 | struct cgroup_netprio_state *cs; | 125 | struct cgroup_netprio_state *cs; |
128 | int ret; | 126 | int ret; |
@@ -146,7 +144,7 @@ static struct cgroup_subsys_state *cgrp_create(struct cgroup_subsys *ss, | |||
146 | return &cs->css; | 144 | return &cs->css; |
147 | } | 145 | } |
148 | 146 | ||
149 | static void cgrp_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp) | 147 | static void cgrp_destroy(struct cgroup *cgrp) |
150 | { | 148 | { |
151 | struct cgroup_netprio_state *cs; | 149 | struct cgroup_netprio_state *cs; |
152 | struct net_device *dev; | 150 | struct net_device *dev; |
diff --git a/net/core/sock.c b/net/core/sock.c index 95aff9c7419b..1fb21b51593b 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -160,19 +160,19 @@ int mem_cgroup_sockets_init(struct cgroup *cgrp, struct cgroup_subsys *ss) | |||
160 | out: | 160 | out: |
161 | list_for_each_entry_continue_reverse(proto, &proto_list, node) | 161 | list_for_each_entry_continue_reverse(proto, &proto_list, node) |
162 | if (proto->destroy_cgroup) | 162 | if (proto->destroy_cgroup) |
163 | proto->destroy_cgroup(cgrp, ss); | 163 | proto->destroy_cgroup(cgrp); |
164 | mutex_unlock(&proto_list_mutex); | 164 | mutex_unlock(&proto_list_mutex); |
165 | return ret; | 165 | return ret; |
166 | } | 166 | } |
167 | 167 | ||
168 | void mem_cgroup_sockets_destroy(struct cgroup *cgrp, struct cgroup_subsys *ss) | 168 | void mem_cgroup_sockets_destroy(struct cgroup *cgrp) |
169 | { | 169 | { |
170 | struct proto *proto; | 170 | struct proto *proto; |
171 | 171 | ||
172 | mutex_lock(&proto_list_mutex); | 172 | mutex_lock(&proto_list_mutex); |
173 | list_for_each_entry_reverse(proto, &proto_list, node) | 173 | list_for_each_entry_reverse(proto, &proto_list, node) |
174 | if (proto->destroy_cgroup) | 174 | if (proto->destroy_cgroup) |
175 | proto->destroy_cgroup(cgrp, ss); | 175 | proto->destroy_cgroup(cgrp); |
176 | mutex_unlock(&proto_list_mutex); | 176 | mutex_unlock(&proto_list_mutex); |
177 | } | 177 | } |
178 | #endif | 178 | #endif |