aux/pb: more correctly check number of reclaims

the increment needs to happen before the comparison here

Fixes: 3d6c8829f5 ("aux/pb: add a tolerance for reclaim failure")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13388>
This commit is contained in:
Mike Blumenkrantz 2021-10-15 16:01:52 -04:00 committed by Marge Bot
parent 58f605e4d4
commit fe2674dd52

View file

@ -89,7 +89,7 @@ pb_slabs_reclaim_locked(struct pb_slabs *slabs)
* the driver should not walk the entire list, as this is likely to
* result in zero reclaims if the first few entries fail to reclaim
*/
} else if (num_failed_reclaims++ > MAX_FAILED_RECLAIMS) {
} else if (++num_failed_reclaims >= MAX_FAILED_RECLAIMS) {
break;
}
}