forked from Minki/linux
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>
This commit is contained in:
parent
77f76013e3
commit
92b1582268
@ -492,7 +492,6 @@ err_idr:
|
|||||||
|
|
||||||
err_unreg:
|
err_unreg:
|
||||||
ib_dereg_mr(mr);
|
ib_dereg_mr(mr);
|
||||||
atomic_dec(&pd->usecnt);
|
|
||||||
|
|
||||||
err_up:
|
err_up:
|
||||||
mutex_unlock(&ib_uverbs_idr_mutex);
|
mutex_unlock(&ib_uverbs_idr_mutex);
|
||||||
@ -986,11 +985,6 @@ err_idr:
|
|||||||
|
|
||||||
err_destroy:
|
err_destroy:
|
||||||
ib_destroy_qp(qp);
|
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:
|
err_up:
|
||||||
mutex_unlock(&ib_uverbs_idr_mutex);
|
mutex_unlock(&ib_uverbs_idr_mutex);
|
||||||
@ -1888,7 +1882,6 @@ err_idr:
|
|||||||
|
|
||||||
err_destroy:
|
err_destroy:
|
||||||
ib_destroy_srq(srq);
|
ib_destroy_srq(srq);
|
||||||
atomic_dec(&pd->usecnt);
|
|
||||||
|
|
||||||
err_up:
|
err_up:
|
||||||
mutex_unlock(&ib_uverbs_idr_mutex);
|
mutex_unlock(&ib_uverbs_idr_mutex);
|
||||||
|
Loading…
Reference in New Issue
Block a user