diff mbox series

[ovs-dev] ovs-rcu: Remove unneeded mutex from struct ovsrcu_perthread.

Message ID 20210629153549.3313887-1-blp@ovn.org
State Superseded
Headers show
Series [ovs-dev] ovs-rcu: Remove unneeded mutex from struct ovsrcu_perthread. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot success github build: passed

Commit Message

Ben Pfaff June 29, 2021, 3:35 p.m. UTC
It was not really used.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Reported-by: 贺鹏 <xnhp0320@gmail.com>
---
 lib/ovs-rcu.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

David Marchand June 30, 2021, 5:32 a.m. UTC | #1
Hello Ben,

On Tue, Jun 29, 2021 at 5:36 PM Ben Pfaff <blp@ovn.org> wrote:
>
> It was not really used.

If I am not mistaken, this is the same patch as
https://patchwork.ozlabs.org/project/openvswitch/patch/d89cc03128a6e449ce49f729b9eeafe687356b4e.1621517561.git.grive@u256.net/.

>
> Signed-off-by: Ben Pfaff <blp@ovn.org>
> Reported-by: 贺鹏 <xnhp0320@gmail.com>
Ben Pfaff July 2, 2021, 5:36 p.m. UTC | #2
On Wed, Jun 30, 2021 at 07:32:58AM +0200, David Marchand wrote:
> Hello Ben,
> 
> On Tue, Jun 29, 2021 at 5:36 PM Ben Pfaff <blp@ovn.org> wrote:
> >
> > It was not really used.
> 
> If I am not mistaken, this is the same patch as
> https://patchwork.ozlabs.org/project/openvswitch/patch/d89cc03128a6e449ce49f729b9eeafe687356b4e.1621517561.git.grive@u256.net/.

Yes, thanks.
diff mbox series

Patch

diff --git a/lib/ovs-rcu.c b/lib/ovs-rcu.c
index cde1e925ba94..1866bd308822 100644
--- a/lib/ovs-rcu.c
+++ b/lib/ovs-rcu.c
@@ -47,7 +47,6 @@  struct ovsrcu_cbset {
 struct ovsrcu_perthread {
     struct ovs_list list_node;  /* In global list. */
 
-    struct ovs_mutex mutex;
     uint64_t seqno;
     struct ovsrcu_cbset *cbset;
     char name[16];              /* This thread's name. */
@@ -84,7 +83,6 @@  ovsrcu_perthread_get(void)
         const char *name = get_subprogram_name();
 
         perthread = xmalloc(sizeof *perthread);
-        ovs_mutex_init(&perthread->mutex);
         perthread->seqno = seq_read(global_seqno);
         perthread->cbset = NULL;
         ovs_strlcpy(perthread->name, name[0] ? name : "main",
@@ -406,7 +404,6 @@  ovsrcu_unregister__(struct ovsrcu_perthread *perthread)
     ovs_list_remove(&perthread->list_node);
     ovs_mutex_unlock(&ovsrcu_threads_mutex);
 
-    ovs_mutex_destroy(&perthread->mutex);
     free(perthread);
 
     seq_change(global_seqno);