]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: merge rtnl_lock sections in dsa_slave_create
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 5 Jan 2022 23:11:13 +0000 (01:11 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Jan 2022 11:59:09 +0000 (11:59 +0000)
commitca454b18bb2e7d52aff61c2ec46a2ec760679d11
treefdc506a5d98febdbedc0a7addabda2cfd3ac3501
parent6bf0e3b74c0bd06f03db7c1c4d72722ba015c151
net: dsa: merge rtnl_lock sections in dsa_slave_create

Currently dsa_slave_create() has two sequences of rtnl_lock/rtnl_unlock
in a row. Remove the rtnl_unlock() and rtnl_lock() in between, such that
the operation can execute slighly faster.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/slave.c