[master] 41833f2be vai: polish sml_ai_lease_boc()

Nils Goroll nils.goroll at uplex.de
Mon Sep 29 13:24:02 UTC 2025


commit 41833f2bed22a2e569f2137dddcc52b0cc0a4537
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Tue Aug 5 16:09:13 2025 +0200

    vai: polish sml_ai_lease_boc()
    
    We really should get the logically first segment only one.

diff --git a/bin/varnishd/storage/storage_simple.c b/bin/varnishd/storage/storage_simple.c
index 054b02881..4a9d47195 100644
--- a/bin/varnishd/storage/storage_simple.c
+++ b/bin/varnishd/storage/storage_simple.c
@@ -491,10 +491,8 @@ sml_ai_lease_boc(struct worker *wrk, vai_hdl vhdl, struct vscarab *scarab)
 	}
 	if (hdl->last != NULL)
 		hdl->last = NULL;
-	if (hdl->st == NULL) {
-		assert(hdl->returned == 0 || hdl->avail == hdl->returned);
+	if (hdl->st == NULL && hdl->returned == 0)
 		hdl->st = VTAILQ_LAST(&hdl->obj->list, storagehead);
-	}
 	if (hdl->st == NULL)
 		assert(hdl->avail == hdl->returned);
 


More information about the varnish-commit mailing list