From 5983c503df7550ab5578094ffd5602216c66d9fc Mon Sep 17 00:00:00 2001 From: Dridi Boukelmoune Date: Mon, 16 Oct 2023 16:53:50 +0200 Subject: [PATCH] SQUASHME: prune h2_poll critical section --- bin/varnishd/http2/cache_http2_session.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/bin/varnishd/http2/cache_http2_session.c b/bin/varnishd/http2/cache_http2_session.c index 1a2abadc99a..5775b6da680 100644 --- a/bin/varnishd/http2/cache_http2_session.c +++ b/bin/varnishd/http2/cache_http2_session.c @@ -442,17 +442,10 @@ static int v_matchproto_(vtr_poll_f) h2_poll(struct req *req) { struct h2_req *r2; - int r = 1; CHECK_OBJ_NOTNULL(req, REQ_MAGIC); CAST_OBJ_NOTNULL(r2, req->transport_priv, H2_REQ_MAGIC); - - Lck_Lock(&r2->h2sess->sess->mtx); - if (r2->error) - r = -1; - Lck_Unlock(&r2->h2sess->sess->mtx); - - return (r); + return (r2->error ? -1 : 1); } struct transport HTTP2_transport = {