aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-02-10 23:32:28 -0500
committerDavid S. Miller <davem@davemloft.net>2012-02-10 23:32:28 -0500
commitd5ef8a4d87ab21d575ac86366599c9152a28028d (patch)
tree8b1be85ad1af7ee6a0e3e36c77ae738c966c1f21 /net/core
parentd9dd966d7fc088a6bed991c2b1e2fba4485e0a31 (diff)
parent8df54d622a120058ee8bec38743c9b8f091c8e58 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/infiniband/hw/nes/nes_cm.c Simple whitespace conflict. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/netprio_cgroup.c8
-rw-r--r--net/core/sock.c7
2 files changed, 3 insertions, 12 deletions
diff --git a/net/core/netprio_cgroup.c b/net/core/netprio_cgroup.c
index 9ae183a9a381..4dacc44637ef 100644
--- a/net/core/netprio_cgroup.c
+++ b/net/core/netprio_cgroup.c
@@ -108,7 +108,7 @@ static void extend_netdev_table(struct net_device *dev, u32 new_len)
108static void update_netdev_tables(void) 108static void update_netdev_tables(void)
109{ 109{
110 struct net_device *dev; 110 struct net_device *dev;
111 u32 max_len = atomic_read(&max_prioidx); 111 u32 max_len = atomic_read(&max_prioidx) + 1;
112 struct netprio_map *map; 112 struct netprio_map *map;
113 113
114 rtnl_lock(); 114 rtnl_lock();
@@ -271,7 +271,6 @@ static int netprio_device_event(struct notifier_block *unused,
271{ 271{
272 struct net_device *dev = ptr; 272 struct net_device *dev = ptr;
273 struct netprio_map *old; 273 struct netprio_map *old;
274 u32 max_len = atomic_read(&max_prioidx);
275 274
276 /* 275 /*
277 * Note this is called with rtnl_lock held so we have update side 276 * Note this is called with rtnl_lock held so we have update side
@@ -279,11 +278,6 @@ static int netprio_device_event(struct notifier_block *unused,
279 */ 278 */
280 279
281 switch (event) { 280 switch (event) {
282
283 case NETDEV_REGISTER:
284 if (max_len)
285 extend_netdev_table(dev, max_len);
286 break;
287 case NETDEV_UNREGISTER: 281 case NETDEV_UNREGISTER:
288 old = rtnl_dereference(dev->priomap); 282 old = rtnl_dereference(dev->priomap);
289 RCU_INIT_POINTER(dev->priomap, NULL); 283 RCU_INIT_POINTER(dev->priomap, NULL);
diff --git a/net/core/sock.c b/net/core/sock.c
index 3e81fd2e3c75..02f8dfe320b7 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1171,13 +1171,10 @@ EXPORT_SYMBOL(sock_update_classid);
1171 1171
1172void sock_update_netprioidx(struct sock *sk) 1172void sock_update_netprioidx(struct sock *sk)
1173{ 1173{
1174 struct cgroup_netprio_state *state;
1175 if (in_interrupt()) 1174 if (in_interrupt())
1176 return; 1175 return;
1177 rcu_read_lock(); 1176
1178 state = task_netprio_state(current); 1177 sk->sk_cgrp_prioidx = task_netprioidx(current);
1179 sk->sk_cgrp_prioidx = state ? state->prioidx : 0;
1180 rcu_read_unlock();
1181} 1178}
1182EXPORT_SYMBOL_GPL(sock_update_netprioidx); 1179EXPORT_SYMBOL_GPL(sock_update_netprioidx);
1183#endif 1180#endif