summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_io.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-05-02 06:36:14 +0000
committerphk <phk@FreeBSD.org>2003-05-02 06:36:14 +0000
commit4c52a206d24421e6c4708baeba60bb6f9b88ebb4 (patch)
treef30ff1854b1e718bcb5d94f16dcee4c13b5afe1a /sys/geom/geom_io.c
parent6b0e95eef5a40043ddb0bb6618b23b20c6da7ab4 (diff)
downloadFreeBSD-src-4c52a206d24421e6c4708baeba60bb6f9b88ebb4.zip
FreeBSD-src-4c52a206d24421e6c4708baeba60bb6f9b88ebb4.tar.gz
Use g_slice_spoiled() rather than g_std_spoiled().
Remember to free the buffer we got from g_read_data().
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 e325ecd..12d75f8 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 *
OpenPOWER on IntegriCloud