Improve comment (explains why previous commit is correct)

parent aa5cb684
......@@ -3219,6 +3219,12 @@ fellow_cache_lru_work(struct worker *wrk, struct fellow_cache_lru *lru)
WRONG("fcs state in lru");
}
/*
* for a break from the foreach, fcs != NULL
*
* so for fcs == NULL, we know we have iterated over
* all of the LRU
*/
if (fcs == NULL) {
AZ(pthread_mutex_unlock(&lru->lru_mtx));
// VSLb(wrk->vsl, SLT_ExpKill, "LRU_Fail");
......@@ -3227,6 +3233,10 @@ fellow_cache_lru_work(struct worker *wrk, struct fellow_cache_lru *lru)
return (0);
}
/*
* at this point, we know we terminated the foreach
* with a break, so we either have an alloc return, or an FCO
*/
if (alloc.ptr != NULL) {
AZ(fco);
AN(alloc.size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment