pool_in_cg: don't bother to check slots past pcg_avail.

This commit is contained in:
yamt 2007-12-22 04:31:34 +00:00
parent 0c303876e6
commit 9108a50874
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: subr_pool.c,v 1.143 2007/12/22 03:28:48 yamt Exp $ */
/* $NetBSD: subr_pool.c,v 1.144 2007/12/22 04:31:34 yamt Exp $ */
/*-
* Copyright (c) 1997, 1999, 2000, 2002, 2007 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.143 2007/12/22 03:28:48 yamt Exp $");
__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.144 2007/12/22 04:31:34 yamt Exp $");
#include "opt_ddb.h"
#include "opt_pool.h"
@ -2943,7 +2943,7 @@ pool_in_cg(struct pool *pp, struct pool_cache_group *pcg, uintptr_t addr)
if (pcg == NULL) {
return false;
}
for (i = 0; i < pcg->pcg_size; i++) {
for (i = 0; i < pcg->pcg_avail; i++) {
if (pool_in_item(pp, pcg->pcg_objects[i].pcgo_va, addr)) {
return true;
}