[master] 40d62bd Have FetchBody reset bo->vfp once it's done with it.

Poul-Henning Kamp phk at varnish-cache.org
Mon Mar 12 14:50:01 CET 2012


commit 40d62bd804931d5bc3a680768309529548c5d00e
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Mar 12 13:49:43 2012 +0000

    Have FetchBody reset bo->vfp once it's done with it.

diff --git a/bin/varnishd/cache/cache_center.c b/bin/varnishd/cache/cache_center.c
index 1c9d48b..3e80d06 100644
--- a/bin/varnishd/cache/cache_center.c
+++ b/bin/varnishd/cache/cache_center.c
@@ -916,7 +916,6 @@ cnt_fetchbody(struct sess *sp, struct worker *wrk, struct req *req)
 		(void)usleep(10000);
 	assert(bo->state >= BOS_FAILED);
 
-	bo->vfp = NULL;
 	assert(WRW_IsReleased(wrk));
 	AZ(bo->vbc);
 	AN(req->director);
diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index a52201a..172f422 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -625,6 +625,8 @@ FetchBody(struct worker *wrk, void *priv)
 	 */
 	AZ(vfp_nop_end(bo));
 
+	bo->vfp = NULL;
+
 	VSLb(bo->vsl, SLT_Fetch_Body, "%u(%s) cls %d mklen %d",
 	    bo->body_status, body_status(bo->body_status),
 	    cls, mklen);
@@ -674,7 +676,7 @@ FetchBody(struct worker *wrk, void *priv)
 
 	}
 	bo->stats = NULL;
-	VBO_DerefBusyObj(NULL, &bo);
+	VBO_DerefBusyObj(wrk, &bo);
 }
 
 /*--------------------------------------------------------------------



More information about the varnish-commit mailing list