summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2006-06-17 20:37:40 -0700
committerRoland Dreier <rolandd@cisco.com>2006-06-17 20:37:40 -0700
commit92b1582268e269b3a9e54e186e740396f0f2012b (patch)
tree6dee998bb8c363ccecdf1f36f155875aea80cdc1 /drivers/infiniband/core
parent77f76013e3ffda605b20184db5862ce1efcb6f5a (diff)
IB/uverbs: Don't decrement usecnt on error paths
In error paths when destroying an object, uverbs should not decrement associated objects' usecnt, since ib_dereg_mr(), ib_destroy_qp(), etc. already do that. Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r--drivers/infiniband/core/uverbs_cmd.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index 4266d2e5eba..37824f68e37 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -492,7 +492,6 @@ err_idr:
err_unreg:
ib_dereg_mr(mr);
- atomic_dec(&pd->usecnt);
err_up:
mutex_unlock(&ib_uverbs_idr_mutex);
@@ -986,11 +985,6 @@ err_idr:
err_destroy:
ib_destroy_qp(qp);
- atomic_dec(&pd->usecnt);
- atomic_dec(&attr.send_cq->usecnt);
- atomic_dec(&attr.recv_cq->usecnt);
- if (attr.srq)
- atomic_dec(&attr.srq->usecnt);
err_up:
mutex_unlock(&ib_uverbs_idr_mutex);
@@ -1888,7 +1882,6 @@ err_idr:
err_destroy:
ib_destroy_srq(srq);
- atomic_dec(&pd->usecnt);
err_up:
mutex_unlock(&ib_uverbs_idr_mutex);