summaryrefslogtreecommitdiff
path: root/sys/kern/subr_extent.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-06-04 22:47:17 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-06-04 22:47:17 +0000
commit8dec4cd8f1c3e6192d5efb2fb8423a0d0af1e2ec (patch)
treebcdf7348988794590fefdf59e02649d0ad533999 /sys/kern/subr_extent.c
parent81cfa1ccb381f31373a24593369b534673c2dd80 (diff)
In extent_destroy(), only remove the extent from the global extent list if
the list is really used, i.e. if option DIAGNOSTIC || option DDB.
Diffstat (limited to 'sys/kern/subr_extent.c')
-rw-r--r--sys/kern/subr_extent.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/subr_extent.c b/sys/kern/subr_extent.c
index 5dca781dd57..03f0bde5aa5 100644
--- a/sys/kern/subr_extent.c
+++ b/sys/kern/subr_extent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_extent.c,v 1.32 2006/03/16 22:14:28 miod Exp $ */
+/* $OpenBSD: subr_extent.c,v 1.33 2006/06/04 22:47:16 miod Exp $ */
/* $NetBSD: subr_extent.c,v 1.7 1996/11/21 18:46:34 cgd Exp $ */
/*-
@@ -260,8 +260,10 @@ extent_destroy(struct extent *ex)
extent_free_region_descriptor(ex, orp);
}
+#if defined(DIAGNOSTIC) || defined(DDB)
/* Remove from the list of all extents. */
LIST_REMOVE(ex, ex_link);
+#endif
/* If we're not a fixed extent, free the extent descriptor itself. */
if ((ex->ex_flags & EXF_FIXED) == 0)