Commit 627964a3 authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Make HSH_Deref return the busyobj to the worker for reuse when

dereferencing and destroying a busy objcore.

Free the busyobj in the case that the worker already has one
(potential race condition from the expiry/ban-lurker threads?)
parent e93ef719
......@@ -718,6 +718,16 @@ HSH_Deref(struct worker *w, struct objcore *oc, struct object **oo)
BAN_DestroyObj(oc);
AZ(oc->ban);
if (oc->flags & OC_F_BUSY) {
CHECK_OBJ_NOTNULL(oc->busyobj, BUSYOBJ_MAGIC);
if (w->nbusyobj == NULL)
w->nbusyobj = oc->busyobj;
else
FREE_OBJ(oc->busyobj);
oc->busyobj = NULL;
}
AZ(oc->busyobj);
if (oc->methods != NULL) {
oc_freeobj(oc);
w->stats.n_object--;
......
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