aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-09-16 14:26:59 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-09-16 17:33:32 +0200
commit05620f85e930b0ac3dc22fdf8e4c390fa11afdeb (patch)
tree31d3f3395a726119043d492624a2a43174918236 /util
parent007e620a7576e4ce2ea6955541e87d8ae8ed32ae (diff)
Revert "rcu: init rcu_registry_lock after fork"
This reverts commit 5243722376873a48e9852a58b91f4d4101ee66e4. The patch forgot about rcu_sync_lock and was committed by mistake. Reported-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'util')
-rw-r--r--util/rcu.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/util/rcu.c b/util/rcu.c
index 47c2bceac8..8ba304dc44 100644
--- a/util/rcu.c
+++ b/util/rcu.c
@@ -335,11 +335,6 @@ static void rcu_init_unlock(void)
qemu_mutex_unlock(&rcu_registry_lock);
qemu_mutex_unlock(&rcu_sync_lock);
}
-
-static void rcu_init_child(void)
-{
- qemu_mutex_init(&rcu_registry_lock);
-}
#endif
void rcu_after_fork(void)
@@ -351,7 +346,7 @@ void rcu_after_fork(void)
static void __attribute__((__constructor__)) rcu_init(void)
{
#ifdef CONFIG_POSIX
- pthread_atfork(rcu_init_lock, rcu_init_unlock, rcu_init_child);
+ pthread_atfork(rcu_init_lock, rcu_init_unlock, rcu_init_unlock);
#endif
rcu_init_complete();
}