[master] 68e262a7f Execute EXP_Insert after unbusy in HSH_Insert

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Fri Jun 12 13:25:08 UTC 2020


commit 68e262a7f90389f21297ba622c300a8576803b55
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Mon Mar 23 14:23:02 2020 +0100

    Execute EXP_Insert after unbusy in HSH_Insert
    
    This makes the order of events the same as on real cache insertions.

diff --git a/bin/varnishd/cache/cache_hash.c b/bin/varnishd/cache/cache_hash.c
index 9fd1b5091..b7c46a8a6 100644
--- a/bin/varnishd/cache/cache_hash.c
+++ b/bin/varnishd/cache/cache_hash.c
@@ -310,7 +310,6 @@ HSH_Insert(struct worker *wrk, const void *digest, struct objcore *oc,
 
 	BAN_RefBan(oc, ban);
 	AN(oc->ban);
-	EXP_Insert(wrk, oc);
 
 	/* Move the object first in the oh list, unbusy it and run the
 	   waitinglist if necessary */
@@ -322,6 +321,8 @@ HSH_Insert(struct worker *wrk, const void *digest, struct objcore *oc,
 		hsh_rush1(wrk, oh, &rush, HSH_RUSH_POLICY);
 	Lck_Unlock(&oh->mtx);
 	hsh_rush2(wrk, &rush);
+
+	EXP_Insert(wrk, oc);
 }
 
 /*---------------------------------------------------------------------


More information about the varnish-commit mailing list