[3.0] dec9098 Clear the pass oc flag bits earlier in the ban lurker
Martin Blix Grydeland
martin at varnish-software.com
Wed Apr 9 12:30:40 CEST 2014
commit dec9098a2ac760d7ba4765a9a1a1091103b6eb05
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date: Wed Apr 9 11:28:43 2014 +0200
Clear the pass oc flag bits earlier in the ban lurker
The pass bits of the oc's flags wasn't cleared before or'ing the new
pass on failing the busy object test in the ban lurker. This would
cause the pass not to be matched later, making the lurker spin on the
busy object.
Fixes: #1470
diff --git a/bin/varnishd/cache_ban.c b/bin/varnishd/cache_ban.c
index 6062f98..4e4de57 100644
--- a/bin/varnishd/cache_ban.c
+++ b/bin/varnishd/cache_ban.c
@@ -844,6 +844,10 @@ ban_lurker_work(const struct sess *sp, unsigned pass)
continue;
}
/*
+ * Clear this oc's pass bits.
+ */
+ oc->flags &= ~OC_F_LURK;
+ /*
* If the object is busy, we can't touch
* it. Defer it to a later run.
*/
@@ -861,7 +865,6 @@ ban_lurker_work(const struct sess *sp, unsigned pass)
*/
AN(oc->refcnt);
oc->refcnt++;
- oc->flags &= ~OC_F_LURK;
Lck_Unlock(&ban_mtx);
/*
* Get the object and check it against all relevant bans
More information about the varnish-commit
mailing list