aboutsummaryrefslogtreecommitdiff
path: root/sys/geom/geom_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/geom/geom_io.c')
-rw-r--r--sys/geom/geom_io.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c
index e325ecd98d3a..12d75f8afa09 100644
--- a/sys/geom/geom_io.c
+++ b/sys/geom/geom_io.c
@@ -109,6 +109,8 @@ g_bioq_enqueue_tail(struct bio *bp, struct g_bioq *rq)
g_bioq_unlock(rq);
}
+MALLOC_DEFINE(M_GEOMBIO, "GEOM bio", "Geom bio");
+
struct bio *
g_new_bio(void)
{
@@ -118,7 +120,7 @@ g_new_bio(void)
bp = g_bioq_first(&g_bio_idle);
g_bioq_unlock(&g_bio_idle);
if (bp == NULL)
- bp = g_malloc(sizeof *bp, M_NOWAIT | M_ZERO);
+ bp = malloc(sizeof *bp, M_GEOMBIO, M_NOWAIT | M_ZERO);
/* g_trace(G_T_BIO, "g_new_bio() = %p", bp); */
return (bp);
}
@@ -127,9 +129,13 @@ void
g_destroy_bio(struct bio *bp)
{
+#if 0
/* g_trace(G_T_BIO, "g_destroy_bio(%p)", bp); */
bzero(bp, sizeof *bp);
g_bioq_enqueue_tail(bp, &g_bio_idle);
+#else
+ free(bp, M_GEOMBIO);
+#endif
}
struct bio *