Commit aede2501 authored by Erez Shitrit's avatar Erez Shitrit Committed by Roland Dreier

IPoIB: Avoid flushing the driver workqueue on dev_down

The driver should not flush the whole workqueue when only one work (the
pkey poll one) needs to be cancelled.  Use cancel_delayed_work_sync()
instead.
Signed-off-by: default avatarErez Shitrit <erezsh@mellanox.com>
Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent f47944cc
...@@ -749,10 +749,8 @@ int ipoib_ib_dev_down(struct net_device *dev, int flush) ...@@ -749,10 +749,8 @@ int ipoib_ib_dev_down(struct net_device *dev, int flush)
if (!test_bit(IPOIB_PKEY_ASSIGNED, &priv->flags)) { if (!test_bit(IPOIB_PKEY_ASSIGNED, &priv->flags)) {
mutex_lock(&pkey_mutex); mutex_lock(&pkey_mutex);
set_bit(IPOIB_PKEY_STOP, &priv->flags); set_bit(IPOIB_PKEY_STOP, &priv->flags);
cancel_delayed_work(&priv->pkey_poll_task); cancel_delayed_work_sync(&priv->pkey_poll_task);
mutex_unlock(&pkey_mutex); mutex_unlock(&pkey_mutex);
if (flush)
flush_workqueue(ipoib_workqueue);
} }
ipoib_mcast_stop_thread(dev, flush); ipoib_mcast_stop_thread(dev, flush);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment