Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 56732
b: refs/heads/master
c: 8b8c8bc
h: refs/heads/master
v: v3
  • Loading branch information
Roland Dreier committed May 19, 2007
1 parent 9658d4c commit 881ef93
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7b82cd8ee7374f803a3daf9a6cbc6eb4bbb10a63
refs/heads/master: 8b8c8bca3a63073bac20f0fca178e00fdf7f5a09
16 changes: 7 additions & 9 deletions trunk/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,9 @@ static int ipath_mcast_add(struct ipath_ibdev *dev,
{
struct rb_node **n = &mcast_tree.rb_node;
struct rb_node *pn = NULL;
unsigned long flags;
int ret;

spin_lock_irqsave(&mcast_lock, flags);
spin_lock_irq(&mcast_lock);

while (*n) {
struct ipath_mcast *tmcast;
Expand Down Expand Up @@ -228,7 +227,7 @@ static int ipath_mcast_add(struct ipath_ibdev *dev,
ret = 0;

bail:
spin_unlock_irqrestore(&mcast_lock, flags);
spin_unlock_irq(&mcast_lock);

return ret;
}
Expand Down Expand Up @@ -289,17 +288,16 @@ int ipath_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
struct ipath_mcast *mcast = NULL;
struct ipath_mcast_qp *p, *tmp;
struct rb_node *n;
unsigned long flags;
int last = 0;
int ret;

spin_lock_irqsave(&mcast_lock, flags);
spin_lock_irq(&mcast_lock);

/* Find the GID in the mcast table. */
n = mcast_tree.rb_node;
while (1) {
if (n == NULL) {
spin_unlock_irqrestore(&mcast_lock, flags);
spin_unlock_irq(&mcast_lock);
ret = -EINVAL;
goto bail;
}
Expand Down Expand Up @@ -334,7 +332,7 @@ int ipath_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
break;
}

spin_unlock_irqrestore(&mcast_lock, flags);
spin_unlock_irq(&mcast_lock);

if (p) {
/*
Expand All @@ -348,9 +346,9 @@ int ipath_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
atomic_dec(&mcast->refcount);
wait_event(mcast->wait, !atomic_read(&mcast->refcount));
ipath_mcast_free(mcast);
spin_lock(&dev->n_mcast_grps_lock);
spin_lock_irq(&dev->n_mcast_grps_lock);
dev->n_mcast_grps_allocated--;
spin_unlock(&dev->n_mcast_grps_lock);
spin_unlock_irq(&dev->n_mcast_grps_lock);
}

ret = 0;
Expand Down

0 comments on commit 881ef93

Please sign in to comment.