diff options
author | Roland Dreier <rolandd@cisco.com> | 2006-06-17 23:37:40 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-06-17 23:37:40 -0400 |
commit | 92b1582268e269b3a9e54e186e740396f0f2012b (patch) | |
tree | 6dee998bb8c363ccecdf1f36f155875aea80cdc1 /drivers | |
parent | 77f76013e3ffda605b20184db5862ce1efcb6f5a (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')
-rw-r--r-- | drivers/infiniband/core/uverbs_cmd.c | 7 |
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 | ||
493 | err_unreg: | 493 | err_unreg: |
494 | ib_dereg_mr(mr); | 494 | ib_dereg_mr(mr); |
495 | atomic_dec(&pd->usecnt); | ||
496 | 495 | ||
497 | err_up: | 496 | err_up: |
498 | mutex_unlock(&ib_uverbs_idr_mutex); | 497 | mutex_unlock(&ib_uverbs_idr_mutex); |
@@ -986,11 +985,6 @@ err_idr: | |||
986 | 985 | ||
987 | err_destroy: | 986 | err_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 | ||
995 | err_up: | 989 | err_up: |
996 | mutex_unlock(&ib_uverbs_idr_mutex); | 990 | mutex_unlock(&ib_uverbs_idr_mutex); |
@@ -1888,7 +1882,6 @@ err_idr: | |||
1888 | 1882 | ||
1889 | err_destroy: | 1883 | err_destroy: |
1890 | ib_destroy_srq(srq); | 1884 | ib_destroy_srq(srq); |
1891 | atomic_dec(&pd->usecnt); | ||
1892 | 1885 | ||
1893 | err_up: | 1886 | err_up: |
1894 | mutex_unlock(&ib_uverbs_idr_mutex); | 1887 | mutex_unlock(&ib_uverbs_idr_mutex); |