rtnetlink: small rtnl lock pushdown
authorFlorian Westphal <[email protected]>
Wed, 9 Aug 2017 18:41:50 +0000 (20:41 +0200)
committerDavid S. Miller <[email protected]>
Wed, 9 Aug 2017 23:57:38 +0000 (16:57 -0700)
commit0cc09020aefe832db23d63cd3a6c889ab7645eec
tree5458da1272db981d04048d558e64baa5bdcdabbf
parent019a316992ee0d9832b1c480c899d6bdf2a0a77e
rtnetlink: small rtnl lock pushdown

instead of rtnl lock/unload at the top level, push it down
to the called function.

This is just an intermediate step, next commit switches protection
of the rtnl_link ops table to rcu, in which case (for dumps) the
rtnl lock is acquired only by the netlink dumper infrastructure
(current lock/unlock/dump/lock/unlock rtnl sequence becomes
 rcu lock/rcu unlock/dump).

Signed-off-by: Florian Westphal <[email protected]>
Reviewed-by: Hannes Frederic Sowa <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/core/rtnetlink.c