Message ID | 98f45368-0dcf-d68b-759c-7a6fae08e74a@dev.mellanox.co.il (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
--- a/drivers/infiniband/core/uverbs_std_types_counters.c +++ b/drivers/infiniband/core/uverbs_std_types_counters.c @@ -38,10 +38,10 @@ static int uverbs_free_counters(struct ib_uobject *uobject, enum rdma_remove_reason why) { struct ib_counters *counters = uobject->object; + int ret = atomic_read(&counters->usecnt) ? -EBUSY : 0; - if (why == RDMA_REMOVE_DESTROY && - atomic_read(&counters->usecnt)) - return -EBUSY; + if (ib_is_destroy_retryable(ret, why, uobject)) + return ret; return counters->device->destroy_counters(counters);