[4.1] b2ee567 Rush the objheader if there is a waiting list when it is deref'ed.

Lasse Karstensen lkarsten at varnish-software.com
Thu Jan 14 15:15:12 CET 2016


commit b2ee5677764ce90e59083e665af2188fa255b100
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Jan 6 19:13:47 2016 +0000

    Rush the objheader if there is a waiting list when it is deref'ed.
    
    Fixes:	#1823

diff --git a/bin/varnishd/cache/cache_hash.c b/bin/varnishd/cache/cache_hash.c
index dd03596..0bb827d 100644
--- a/bin/varnishd/cache/cache_hash.c
+++ b/bin/varnishd/cache/cache_hash.c
@@ -820,6 +820,10 @@ HSH_DerefObjHead(struct worker *wrk, struct objhead **poh)
 		oh->refcnt--;
 		Lck_Unlock(&oh->mtx);
 		return(1);
+	} else if (oh->waitinglist != NULL) {
+		Lck_Lock(&oh->mtx);
+		hsh_rush(wrk, oh);
+		Lck_Unlock(&oh->mtx);
 	}
 
 	assert(oh->refcnt > 0);



More information about the varnish-commit mailing list