diff options
-rw-r--r-- | include/net/geneve.h | 1 | ||||
-rw-r--r-- | net/ipv4/geneve.c | 21 |
2 files changed, 2 insertions, 20 deletions
diff --git a/include/net/geneve.h b/include/net/geneve.h index 112132cf8e2e..56c7e1ac216a 100644 --- a/include/net/geneve.h +++ b/include/net/geneve.h | |||
@@ -71,7 +71,6 @@ struct geneve_sock { | |||
71 | struct hlist_node hlist; | 71 | struct hlist_node hlist; |
72 | geneve_rcv_t *rcv; | 72 | geneve_rcv_t *rcv; |
73 | void *rcv_data; | 73 | void *rcv_data; |
74 | struct work_struct del_work; | ||
75 | struct socket *sock; | 74 | struct socket *sock; |
76 | struct rcu_head rcu; | 75 | struct rcu_head rcu; |
77 | atomic_t refcnt; | 76 | atomic_t refcnt; |
diff --git a/net/ipv4/geneve.c b/net/ipv4/geneve.c index 19e256e1dd92..136a829e8746 100644 --- a/net/ipv4/geneve.c +++ b/net/ipv4/geneve.c | |||
@@ -61,8 +61,6 @@ struct geneve_net { | |||
61 | 61 | ||
62 | static int geneve_net_id; | 62 | static int geneve_net_id; |
63 | 63 | ||
64 | static struct workqueue_struct *geneve_wq; | ||
65 | |||
66 | static inline struct genevehdr *geneve_hdr(const struct sk_buff *skb) | 64 | static inline struct genevehdr *geneve_hdr(const struct sk_buff *skb) |
67 | { | 65 | { |
68 | return (struct genevehdr *)(udp_hdr(skb) + 1); | 66 | return (struct genevehdr *)(udp_hdr(skb) + 1); |
@@ -307,15 +305,6 @@ error: | |||
307 | return 1; | 305 | return 1; |
308 | } | 306 | } |
309 | 307 | ||
310 | static void geneve_del_work(struct work_struct *work) | ||
311 | { | ||
312 | struct geneve_sock *gs = container_of(work, struct geneve_sock, | ||
313 | del_work); | ||
314 | |||
315 | udp_tunnel_sock_release(gs->sock); | ||
316 | kfree_rcu(gs, rcu); | ||
317 | } | ||
318 | |||
319 | static struct socket *geneve_create_sock(struct net *net, bool ipv6, | 308 | static struct socket *geneve_create_sock(struct net *net, bool ipv6, |
320 | __be16 port) | 309 | __be16 port) |
321 | { | 310 | { |
@@ -356,8 +345,6 @@ static struct geneve_sock *geneve_socket_create(struct net *net, __be16 port, | |||
356 | if (!gs) | 345 | if (!gs) |
357 | return ERR_PTR(-ENOMEM); | 346 | return ERR_PTR(-ENOMEM); |
358 | 347 | ||
359 | INIT_WORK(&gs->del_work, geneve_del_work); | ||
360 | |||
361 | sock = geneve_create_sock(net, ipv6, port); | 348 | sock = geneve_create_sock(net, ipv6, port); |
362 | if (IS_ERR(sock)) { | 349 | if (IS_ERR(sock)) { |
363 | kfree(gs); | 350 | kfree(gs); |
@@ -430,7 +417,8 @@ void geneve_sock_release(struct geneve_sock *gs) | |||
430 | geneve_notify_del_rx_port(gs); | 417 | geneve_notify_del_rx_port(gs); |
431 | spin_unlock(&gn->sock_lock); | 418 | spin_unlock(&gn->sock_lock); |
432 | 419 | ||
433 | queue_work(geneve_wq, &gs->del_work); | 420 | udp_tunnel_sock_release(gs->sock); |
421 | kfree_rcu(gs, rcu); | ||
434 | } | 422 | } |
435 | EXPORT_SYMBOL_GPL(geneve_sock_release); | 423 | EXPORT_SYMBOL_GPL(geneve_sock_release); |
436 | 424 | ||
@@ -458,10 +446,6 @@ static int __init geneve_init_module(void) | |||
458 | { | 446 | { |
459 | int rc; | 447 | int rc; |
460 | 448 | ||
461 | geneve_wq = alloc_workqueue("geneve", 0, 0); | ||
462 | if (!geneve_wq) | ||
463 | return -ENOMEM; | ||
464 | |||
465 | rc = register_pernet_subsys(&geneve_net_ops); | 449 | rc = register_pernet_subsys(&geneve_net_ops); |
466 | if (rc) | 450 | if (rc) |
467 | return rc; | 451 | return rc; |
@@ -474,7 +458,6 @@ late_initcall(geneve_init_module); | |||
474 | 458 | ||
475 | static void __exit geneve_cleanup_module(void) | 459 | static void __exit geneve_cleanup_module(void) |
476 | { | 460 | { |
477 | destroy_workqueue(geneve_wq); | ||
478 | unregister_pernet_subsys(&geneve_net_ops); | 461 | unregister_pernet_subsys(&geneve_net_ops); |
479 | } | 462 | } |
480 | module_exit(geneve_cleanup_module); | 463 | module_exit(geneve_cleanup_module); |