Skip to content

Commit afe1de6

Browse files
dledfordrolandd
authored andcommitted
IPoIB: Consolidate rtnl_lock tasks in workqueue
Setting the MTU can safely be moved to the carrier_on_task, which keeps us from needing to take the rtnl lock in the join_finish section. Signed-off-by: Doug Ledford <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
1 parent 70e71ca commit afe1de6

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/infiniband/ulp/ipoib/ipoib_multicast.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,6 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast,
190190
spin_unlock_irq(&priv->lock);
191191
priv->tx_wr.wr.ud.remote_qkey = priv->qkey;
192192
set_qkey = 1;
193-
194-
if (!ipoib_cm_admin_enabled(dev)) {
195-
rtnl_lock();
196-
dev_set_mtu(dev, min(priv->mcast_mtu, priv->admin_mtu));
197-
rtnl_unlock();
198-
}
199193
}
200194

201195
if (!test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) {
@@ -371,6 +365,8 @@ void ipoib_mcast_carrier_on_task(struct work_struct *work)
371365
}
372366

373367
rtnl_lock();
368+
if (!ipoib_cm_admin_enabled(priv->dev))
369+
dev_set_mtu(priv->dev, min(priv->mcast_mtu, priv->admin_mtu));
374370
netif_carrier_on(priv->dev);
375371
rtnl_unlock();
376372
}

0 commit comments

Comments
 (0)