summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_dev.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-05-02 06:42:59 +0000
committerphk <phk@FreeBSD.org>2003-05-02 06:42:59 +0000
commit055cf65eb1d06904d69d4b58914213644ad8cb0d (patch)
treebb8126af9ed3864ba67d3f80bced0b3ac8d831ee /sys/geom/geom_dev.c
parent9bb7fb74d1c16b096bf1753ef0429c85eb933304 (diff)
downloadFreeBSD-src-055cf65eb1d06904d69d4b58914213644ad8cb0d.zip
FreeBSD-src-055cf65eb1d06904d69d4b58914213644ad8cb0d.tar.gz
Back out all the stuff that didn't belong in the last commit.
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 9b25871..b090d75 100644
--- a/sys/geom/geom_dev.c
+++ b/sys/geom/geom_dev.c
@@ -244,7 +244,6 @@ 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
@@ -273,6 +272,7 @@ 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 = malloc(sizeof *gio, M_GEOMGIO, M_WAITOK | M_ZERO);
+ gio = g_malloc(sizeof *gio, 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)
- free(gio, M_GEOMGIO);
+ g_free(gio);
return (error);
}
OpenPOWER on IntegriCloud