[ovs-dev] [PATCH ovn 2/2] ovn-parallel-hmap: Remove the unused mutex in worker_control.

Han Zhou hzhou at ovn.org
Mon Oct 4 01:37:33 UTC 2021


It is not used, and seems not going to be needed, so remove it.

Signed-off-by: Han Zhou <hzhou at ovn.org>
---
 lib/ovn-parallel-hmap.c | 1 -
 lib/ovn-parallel-hmap.h | 1 -
 2 files changed, 2 deletions(-)

diff --git a/lib/ovn-parallel-hmap.c b/lib/ovn-parallel-hmap.c
index b8c7ac786..3c9f3a0ff 100644
--- a/lib/ovn-parallel-hmap.c
+++ b/lib/ovn-parallel-hmap.c
@@ -132,7 +132,6 @@ ovn_add_worker_pool(void *(*start)(void *))
             new_control->id = i;
             new_control->done = new_pool->done;
             new_control->data = NULL;
-            ovs_mutex_init(&new_control->mutex);
             new_control->finished = ATOMIC_VAR_INIT(false);
             sprintf(sem_name, WORKER_SEM_NAME, sembase, new_pool, i);
             new_control->fire = sem_open(sem_name, O_CREAT, S_IRWXU, 0);
diff --git a/lib/ovn-parallel-hmap.h b/lib/ovn-parallel-hmap.h
index 897208ef8..f3cd7a210 100644
--- a/lib/ovn-parallel-hmap.h
+++ b/lib/ovn-parallel-hmap.h
@@ -79,7 +79,6 @@ struct worker_control {
     atomic_bool finished; /* Set to true after achunk of work is complete. */
     sem_t *fire; /* Work start semaphore - sem_post starts the worker. */
     sem_t *done; /* Work completion semaphore - sem_post on completion. */
-    struct ovs_mutex mutex; /* Guards the data. */
     void *data; /* Pointer to data to be processed. */
     void *workload; /* back-pointer to the worker pool structure. */
     pthread_t worker;
-- 
2.30.2



More information about the dev mailing list