Fix unintended control flow in fellow_cache_lru_work()

The optimized case for multiple segments from the same fco did
not work as expected, continue did not continue the inner loop.

Spotted by Coverity, CID#469236
parent e7f6d9a7
......@@ -3182,7 +3182,7 @@ fellow_cache_lru_work(struct worker *wrk, struct fellow_cache_lru *lru)
continue;
}
if (fcs->state == FCS_INCORE) {
do {
while (1) {
fellow_cache_lru_seg_evict_locked(fcs,
&alloc, lru);
AN(buddy_return_ptr_extent(rets, &alloc));
......@@ -3195,7 +3195,8 @@ fellow_cache_lru_work(struct worker *wrk, struct fellow_cache_lru *lru)
fcss = VTAILQ_NEXT(fcs, lru_list);
continue;
}
} while (0);
break;
}
AZ(pthread_mutex_unlock(&fco->mtx));
fco = NULL;
......
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