diff options
author | Christian Brauner <christian.brauner@ubuntu.com> | 2018-03-19 13:17:30 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-22 11:16:42 -0400 |
commit | 94e5e3087a67c765be98592b36d8d187566478d5 (patch) | |
tree | 3d2b8468bfa74e705a29702bb90ff2b9172e8a0b /include/net/net_namespace.h | |
parent | aa65f636540539e2e1fd77bdcd8fc7060d19d47b (diff) |
net: add uevent socket member
This commit adds struct uevent_sock to struct net. Since struct uevent_sock
records the position of the uevent socket in the uevent socket list we can
trivially remove it from the uevent socket list during cleanup. This speeds
up the old removal codepath.
Note, list_del() will hit __list_del_entry_valid() in its call chain which
will validate that the element is a member of the list. If it isn't it will
take care that the list is not modified.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/net_namespace.h')
-rw-r--r-- | include/net/net_namespace.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 71abc8d79178..09e30bdc7876 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h @@ -40,7 +40,7 @@ struct net_device; struct sock; struct ctl_table_header; struct net_generic; -struct sock; +struct uevent_sock; struct netns_ipvs; @@ -83,6 +83,8 @@ struct net { struct sock *rtnl; /* rtnetlink socket */ struct sock *genl_sock; + struct uevent_sock *uevent_sock; /* uevent socket */ + struct list_head dev_base_head; struct hlist_head *dev_name_head; struct hlist_head *dev_index_head; |