]> git.baikalelectronics.ru Git - kernel.git/commit
net: add uevent socket member
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 19 Mar 2018 12:17:30 +0000 (13:17 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Mar 2018 15:16:42 +0000 (11:16 -0400)
commit2029cc70f3452eff7c36aad220976096b039a936
tree3d2b8468bfa74e705a29702bb90ff2b9172e8a0b
parentdb0fe30a01c2545e12ed2e5b61ffa250ff66e2a6
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>
include/net/net_namespace.h
lib/kobject_uevent.c