r4631 - trunk/varnish-cache/bin/varnishd

phk at varnish-cache.org phk at varnish-cache.org
Thu Mar 18 12:13:54 CET 2010


Author: phk
Date: 2010-03-18 12:13:54 +0100 (Thu, 18 Mar 2010)
New Revision: 4631

Modified:
   trunk/varnish-cache/bin/varnishd/cache_hash.c
Log:
Make sure to release the waiting list, if we give up caching before
picking up the object body.

Fixes #667



Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_hash.c	2010-03-18 10:13:34 UTC (rev 4630)
+++ trunk/varnish-cache/bin/varnishd/cache_hash.c	2010-03-18 11:13:54 UTC (rev 4631)
@@ -154,6 +154,7 @@
 
 	AZ(oh->refcnt);
 	assert(VTAILQ_EMPTY(&oh->objcs));
+	assert(VTAILQ_EMPTY(&oh->waitinglist));
 	Lck_Delete(&oh->mtx);
 	w->stats.n_objecthead--;
 	FREE_OBJ(oh);
@@ -571,6 +572,8 @@
 	Lck_Lock(&oh->mtx);
 	assert(oc->objhead == oh);
 	VTAILQ_REMOVE(&oh->objcs, oc, list);
+	if (oc->flags & OC_F_BUSY)
+		hsh_rush(oh);
 	Lck_Unlock(&oh->mtx);
 	oc->objhead = NULL;
 	assert(oh->refcnt > 0);




More information about the varnish-commit mailing list