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>
This commit is contained in:

committed by
David S. Miller

parent
19efbd93e6
commit
65b7b5b90f
@@ -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;
|
||||
|
Reference in New Issue
Block a user