IB/core: Use qp->usecnt to track multicast attach/detach
authorOr Gerlitz <ogerlitz@mellanox.com>
Sun, 29 Apr 2012 14:04:22 +0000 (17:04 +0300)
committerRoland Dreier <roland@purestorage.com>
Tue, 8 May 2012 18:16:54 +0000 (11:16 -0700)
Just as we don't allow PDs, CQs, etc. to be destroyed if there are QPs
that are attached to them, don't let a QP be destroyed if there are
multicast group(s) attached to it.  Use the existing usecnt field of
struct ib_qp which was added by commit 0e0ec7e ("RDMA/core: Export
ib_open_qp() to share XRC TGT QPs") to track this.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>

No differences found