r3859 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Mon Mar 2 18:29:11 CET 2009


Author: phk
Date: 2009-03-02 18:29:11 +0100 (Mon, 02 Mar 2009)
New Revision: 3859

Modified:
   trunk/varnish-cache/bin/varnishd/cache_hash.c
Log:
I was confused, always rush when we deref an *object*, it is the
*objhead* we need to be careful about.


Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_hash.c	2009-03-02 16:15:58 UTC (rev 3858)
+++ trunk/varnish-cache/bin/varnishd/cache_hash.c	2009-03-02 17:29:11 UTC (rev 3859)
@@ -601,13 +601,12 @@
 		CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC);
 		
 		Lck_Lock(&oh->mtx);
+		assert(oh->refcnt > 0);
 		assert(o->refcnt > 0);
 		r = --o->refcnt;
-		if (!r) {
-			assert(VTAILQ_EMPTY(&oh->waitinglist));
+		if (!r) 
 			VTAILQ_REMOVE(&oh->objcs, oc, list);
-		} else
-			hsh_rush(oh);
+		hsh_rush(oh);
 		Lck_Unlock(&oh->mtx);
 	}
 



More information about the varnish-commit mailing list