summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_dev.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_dev.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_dev.c')
-rw-r--r--sys/geom/geom_dev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c
index b090d75..9b25871 100644
--- a/sys/geom/geom_dev.c
+++ b/sys/geom/geom_dev.c
@@ -244,6 +244,7 @@ g_dev_close(dev_t dev, int flags, int fmt, struct thread *td)
return (error);
}
+MALLOC_DEFINE(M_GEOMGIO, "GEOMGIO", "Geom data structures");
/*
* XXX: Until we have unmessed the ioctl situation, there is a race against
* XXX: a concurrent orphanization. We cannot close it by holding topology
@@ -272,7 +273,6 @@ g_dev_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
("Consumer with zero access count in g_dev_ioctl"));
DROP_GIANT();
- gio = NULL;
i = IOCPARM_LEN(cmd);
switch (cmd) {
case DIOCGSECTORSIZE:
@@ -314,7 +314,7 @@ g_dev_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
break;
default:
- gio = g_malloc(sizeof *gio, M_WAITOK | M_ZERO);
+ gio = malloc(sizeof *gio, M_GEOMGIO, M_WAITOK | M_ZERO);
gio->cmd = cmd;
gio->data = data;
gio->fflag = fflag;
@@ -354,7 +354,7 @@ g_dev_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
error = ENOTTY;
}
if (gio != NULL)
- g_free(gio);
+ free(gio, M_GEOMGIO);
return (error);
}
OpenPOWER on IntegriCloud