libwd/0117-ecc-remove-the-lock-in-async-send-funciton.patch

37 lines
993 B
Diff
Raw Normal View History

From 60b860d2fc7029e2399bb2380f1650dd0eff7d51 Mon Sep 17 00:00:00 2001
From: Weili Qian <qianweili@huawei.com>
Date: Tue, 31 May 2022 17:01:04 +0800
Subject: [PATCH 129/183] ecc: remove the lock in async send funciton
When sending message, a lock has been added in function 'hisi_qm_send'
to ensure atomicity, so there is no need to repeat lock in
function 'wd_do_ecc_async'.
Signed-off-by: Weili Qian <qianweili@huawei.com>
---
wd_ecc.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/wd_ecc.c b/wd_ecc.c
index c463049..7dd3853 100644
--- a/wd_ecc.c
+++ b/wd_ecc.c
@@ -2151,13 +2151,9 @@ int wd_do_ecc_async(handle_t sess, struct wd_ecc_req *req)
goto fail_with_msg;
msg->tag = mid;
- pthread_spin_lock(&ctx->lock);
ret = ecc_send(ctx->ctx, msg);
- if (ret) {
- pthread_spin_unlock(&ctx->lock);
+ if (ret)
goto fail_with_msg;
- }
- pthread_spin_unlock(&ctx->lock);
ret = wd_add_task_to_async_queue(&wd_ecc_env_config, idx);
if (ret)
--
2.27.0