Commit fe5a286c authored by Nils Goroll's avatar Nils Goroll

read lock sufficient while stopping threads

parent 45641f77
...@@ -367,10 +367,12 @@ vmod_random_remove_backend(VRT_CTX, ...@@ -367,10 +367,12 @@ vmod_random_remove_backend(VRT_CTX,
assert(prop->vd == rr->vd); assert(prop->vd == rr->vd);
VTAILQ_REMOVE(&rr->extra.props, prop, list_vd); VTAILQ_REMOVE(&rr->extra.props, prop, list_vd);
vdir_unlock(rr->vd);
VTAILQ_INIT(&props); VTAILQ_INIT(&props);
VTAILQ_INSERT_HEAD(&props, prop, list_vd); VTAILQ_INSERT_HEAD(&props, prop, list_vd);
vdir_rdlock(rr->vd);
AZ(pthread_mutex_lock(&wa_vcl->mtx)); AZ(pthread_mutex_lock(&wa_vcl->mtx));
wadj_dir_fini(&props, &wa_vcl->props); wadj_dir_fini(&props, &wa_vcl->props);
AZ(pthread_mutex_unlock(&wa_vcl->mtx)); AZ(pthread_mutex_unlock(&wa_vcl->mtx));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment