83 INIT_LIST_HEAD(&mcast->
qp_list);
92 static void qib_mcast_free(
struct qib_mcast *mcast)
118 n = ibp->mcast_tree.rb_node;
132 spin_unlock_irqrestore(&ibp->lock, flags);
136 spin_unlock_irqrestore(&ibp->lock, flags);
160 spin_lock_irq(&ibp->
lock);
181 list_for_each_entry_rcu(p, &tmcast->
qp_list,
list) {
182 if (p->
qp == mqp->
qp) {
214 rb_link_node(&mcast->
rb_node, pn, n);
220 spin_unlock_irq(&ibp->
lock);
227 struct qib_qp *qp = to_iqp(ibqp);
243 mcast = qib_mcast_alloc(gid);
248 mqp = qib_mcast_qp_alloc(qp);
250 qib_mcast_free(mcast);
255 switch (qib_mcast_add(dev, ibp, mcast, mqp)) {
258 qib_mcast_qp_free(mqp);
259 qib_mcast_free(mcast);
263 qib_mcast_free(mcast);
268 qib_mcast_qp_free(mqp);
269 qib_mcast_free(mcast);
285 struct qib_qp *qp = to_iqp(ibqp);
299 spin_lock_irq(&ibp->
lock);
305 spin_unlock_irq(&ibp->
lock);
329 list_del_rcu(&p->
list);
333 if (list_empty(&mcast->
qp_list)) {
340 spin_unlock_irq(&ibp->
lock);
348 qib_mcast_qp_free(p);
353 qib_mcast_free(mcast);