Fix a bug in the logic, otherwise exhausted is set everytime that

outidx == cnt.

Reported by:	pho
This commit is contained in:
attilio 2012-06-23 14:09:52 +00:00
parent 5d9dd820d8
commit 69fc91bff9

View File

@ -776,7 +776,7 @@ vm_radix_lookupn(struct vm_radix *rtree, vm_pindex_t start,
if (++outidx == cnt ||
(VM_RADIX_MAXVAL - start) == 0) {
start++;
if (end == 0)
if ((VM_RADIX_MAXVAL - start) == 0 && end == 0)
*exhausted = 1;
goto out;
}