summaryrefslogtreecommitdiffstats
path: root/net/dsa
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2021-10-26 12:25:56 +0300
committerDavid S. Miller <davem@davemloft.net>2021-10-26 15:07:35 +0100
commit425d19cedef8f5ad5cff07ac545d51feec29733c (patch)
tree7eea5ffa9f1ddbd61af1a9554d15a73c0cde08bf /net/dsa
parentd7d0d423dbaa73fd0506e25971dfdab6bf185d00 (diff)
downloadlinux-stable-425d19cedef8f5ad5cff07ac545d51feec29733c.tar.gz
linux-stable-425d19cedef8f5ad5cff07ac545d51feec29733c.tar.bz2
linux-stable-425d19cedef8f5ad5cff07ac545d51feec29733c.zip
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>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/slave.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index adcfb2cb4e61..dbda0e0fbffa 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -2448,7 +2448,6 @@ static void dsa_slave_switchdev_event_work(struct work_struct *work)
break;
}
- dev_put(switchdev_work->dev);
kfree(switchdev_work);
}
@@ -2521,8 +2520,6 @@ static int dsa_slave_fdb_event(struct net_device *dev,
switchdev_work->vid = fdb_info->vid;
switchdev_work->host_addr = host_addr;
- /* Hold a reference for dsa_fdb_offload_notify */
- dev_hold(dev);
dsa_schedule_work(&switchdev_work->work);
return 0;