
From: Ran Zhou <zhouran10@h-partners.com> driver inclusion category: bugfix bugzilla: https://gitee.com/src-openeuler/rdma-core/issues/I5P3ZQ -------------------------------------------------------------------------- The pthread_spin_init() of qp was done in create_qp(). We removed the spinlock init in this place to avoid initializing twice. Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com> Signed-off-by: Ran Zhou <zhouran10@h-partners.com> --- providers/hns/hns_roce_u_verbs.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/providers/hns/hns_roce_u_verbs.c b/providers/hns/hns_roce_u_verbs.c index ba3fef6..c404948 100644 --- a/providers/hns/hns_roce_u_verbs.c +++ b/providers/hns/hns_roce_u_verbs.c @@ -1933,10 +1933,6 @@ static int hns_roce_alloc_qp_buf(struct ibv_qp_init_attr_ex *attr, { int ret; - if (pthread_spin_init(&qp->sq.hr_lock.lock, PTHREAD_PROCESS_PRIVATE) || - pthread_spin_init(&qp->rq.hr_lock.lock, PTHREAD_PROCESS_PRIVATE)) - return -ENOMEM; - ret = qp_alloc_wqe(attr, hns_attr, qp, ctx); if (ret) return ret; -- 2.30.0