aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2006-04-10 12:43:59 -0400
committerRoland Dreier <rolandd@cisco.com>2006-04-10 12:43:59 -0400
commitf697f74a6b189702474b2fd457e1f9365fa213e3 (patch)
tree2e01abf6b8f324b195c7d72e925b79e9eca9ab1f /drivers/infiniband
parenta30bb96c6f5aca6513e4dbd94962da03d14b20a9 (diff)
IPoIB: Use spin_lock_irq() instead of spin_lock_irqsave()
We know ipoib_flush_paths() is called from plain process context with interrupts enabled, since it does wait_for_completion(). So there's no need to use spin_lock_irqsave() -- spin_lock_irq() is fine. Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 996c6e16a46d..cb078a7d0bf5 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -336,9 +336,8 @@ void ipoib_flush_paths(struct net_device *dev)
336 struct ipoib_dev_priv *priv = netdev_priv(dev); 336 struct ipoib_dev_priv *priv = netdev_priv(dev);
337 struct ipoib_path *path, *tp; 337 struct ipoib_path *path, *tp;
338 LIST_HEAD(remove_list); 338 LIST_HEAD(remove_list);
339 unsigned long flags;
340 339
341 spin_lock_irqsave(&priv->lock, flags); 340 spin_lock_irq(&priv->lock);
342 341
343 list_splice(&priv->path_list, &remove_list); 342 list_splice(&priv->path_list, &remove_list);
344 INIT_LIST_HEAD(&priv->path_list); 343 INIT_LIST_HEAD(&priv->path_list);
@@ -349,12 +348,12 @@ void ipoib_flush_paths(struct net_device *dev)
349 list_for_each_entry_safe(path, tp, &remove_list, list) { 348 list_for_each_entry_safe(path, tp, &remove_list, list) {
350 if (path->query) 349 if (path->query)
351 ib_sa_cancel_query(path->query_id, path->query); 350 ib_sa_cancel_query(path->query_id, path->query);
352 spin_unlock_irqrestore(&priv->lock, flags); 351 spin_unlock_irq(&priv->lock);
353 wait_for_completion(&path->done); 352 wait_for_completion(&path->done);
354 path_free(dev, path); 353 path_free(dev, path);
355 spin_lock_irqsave(&priv->lock, flags); 354 spin_lock_irq(&priv->lock);
356 } 355 }
357 spin_unlock_irqrestore(&priv->lock, flags); 356 spin_unlock_irq(&priv->lock);
358} 357}
359 358
360static void path_rec_completion(int status, 359static void path_rec_completion(int status,