net: Kill net_mutex
authorKirill Tkhai <ktkhai@virtuozzo.com>
Mon, 19 Feb 2018 09:58:38 +0000 (12:58 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Feb 2018 18:23:13 +0000 (13:23 -0500)
commit19efbd93e6fb05eab81856b4fc8d64211dd37088
tree92b753425011641fc730a1eda732169350ad6ffd
parentffc385b95adb0e601f6858b06401adabedf59f81
net: Kill net_mutex

We take net_mutex, when there are !async pernet_operations
registered, and read locking of net_sem is not enough. But
we may get rid of taking the mutex, and just change the logic
to write lock net_sem in such cases. This obviously reduces
the number of lock operations, we do.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/rtnetlink.h
include/net/net_namespace.h
net/core/net_namespace.c