aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKirill Tkhai <ktkhai@virtuozzo.com>2018-02-19 12:58:45 +0300
committerDavid S. Miller <davem@davemloft.net>2018-02-20 13:23:27 -0500
commit65b7b5b90fcd17b25ef43b0cd02bda47bf286675 (patch)
treeb850ae90d607134d8e5dced4c0d5533abfd24a71 /include
parentnet: Kill net_mutex (diff)
downloadlinux-dev-65b7b5b90fcd17b25ef43b0cd02bda47bf286675.tar.xz
linux-dev-65b7b5b90fcd17b25ef43b0cd02bda47bf286675.zip
net: Make cleanup_list and net::cleanup_list of llist type
This simplifies cleanup queueing and makes cleanup lists to use llist primitives. Since llist has its own cmpxchg() ordering, cleanup_list_lock is not more need. Also, struct llist_node is smaller, than struct list_head, so we save some bytes in struct net with this patch. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/net_namespace.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 115b01b92f4d..d4417495773a 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -59,12 +59,13 @@ struct net {
atomic64_t cookie_gen;
struct list_head list; /* list of network namespaces */
- struct list_head cleanup_list; /* namespaces on death row */
struct list_head exit_list; /* To linked to call pernet exit
* methods on dead net (net_sem
* read locked), or to unregister
* pernet ops (net_sem wr locked).
*/
+ struct llist_node cleanup_list; /* namespaces on death row */
+
struct user_namespace *user_ns; /* Owning user namespace */
struct ucounts *ucounts;
spinlock_t nsid_lock;