aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2006-06-17 23:37:40 -0400
committerRoland Dreier <rolandd@cisco.com>2006-06-17 23:37:40 -0400
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 4266d2e5eba4..37824f68e377 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -492,7 +492,6 @@ err_idr:
492 492
493err_unreg: 493err_unreg:
494 ib_dereg_mr(mr); 494 ib_dereg_mr(mr);
495 atomic_dec(&pd->usecnt);
496 495
497err_up: 496err_up:
498 mutex_unlock(&ib_uverbs_idr_mutex); 497 mutex_unlock(&ib_uverbs_idr_mutex);
@@ -986,11 +985,6 @@ err_idr:
986 985
987err_destroy: 986err_destroy:
988 ib_destroy_qp(qp); 987 ib_destroy_qp(qp);
989 atomic_dec(&pd->usecnt);
990 atomic_dec(&attr.send_cq->usecnt);
991 atomic_dec(&attr.recv_cq->usecnt);
992 if (attr.srq)
993 atomic_dec(&attr.srq->usecnt);
994 988
995err_up: 989err_up:
996 mutex_unlock(&ib_uverbs_idr_mutex); 990 mutex_unlock(&ib_uverbs_idr_mutex);
@@ -1888,7 +1882,6 @@ err_idr:
1888 1882
1889err_destroy: 1883err_destroy:
1890 ib_destroy_srq(srq); 1884 ib_destroy_srq(srq);
1891 atomic_dec(&pd->usecnt);
1892 1885
1893err_up: 1886err_up:
1894 mutex_unlock(&ib_uverbs_idr_mutex); 1887 mutex_unlock(&ib_uverbs_idr_mutex);