OSDN Git Service

net: dsa: stop calling dev_hold in dsa_slave_fdb_event
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 26 Oct 2021 09:25:56 +0000 (12:25 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Oct 2021 14:07:35 +0000 (15:07 +0100)
commit425d19cedef8f5ad5cff07ac545d51feec29733c
tree7eea5ffa9f1ddbd61af1a9554d15a73c0cde08bf
parentd7d0d423dbaa73fd0506e25971dfdab6bf185d00
net: dsa: stop calling dev_hold in dsa_slave_fdb_event

Now that we guarantee that SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE events have
finished executing by the time we leave our bridge upper interface,
we've established a stronger boundary condition for how long the
dsa_slave_switchdev_event_work() might run.

As such, it is no longer possible for DSA slave interfaces to become
unregistered, since they are still bridge ports.

So delete the unnecessary dev_hold() and dev_put().

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