diff options
author | kris <kris@FreeBSD.org> | 2007-03-26 21:47:03 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2007-03-26 21:47:03 +0000 |
commit | 21b5ddcd2ee53e7f6c2d3bb1ad0f212507f2bdd1 (patch) | |
tree | fb5a156d9ab4bf08833a8e5f19ac6eb6f8a4b53d | |
parent | 0e5e1ddffd704b66e2b6d865b6db38cace1ef5ae (diff) | |
download | FreeBSD-src-21b5ddcd2ee53e7f6c2d3bb1ad0f212507f2bdd1.zip FreeBSD-src-21b5ddcd2ee53e7f6c2d3bb1ad0f212507f2bdd1.tar.gz |
make_dev(9) can be (and is) called without Giant, so there is no need to
drop the topology lock and acquire Giant around this call.
Reviewed by: phk
-rw-r--r-- | sys/geom/geom_dev.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c index a9752648..fdf57e0 100644 --- a/sys/geom/geom_dev.c +++ b/sys/geom/geom_dev.c @@ -138,19 +138,11 @@ g_dev_taste(struct g_class *mp, struct g_provider *pp, int insist __unused) error = g_attach(cp, pp); KASSERT(error == 0, ("g_dev_taste(%s) failed to g_attach, err=%d", pp->name, error)); - /* - * XXX: I'm not 100% sure we can call make_dev(9) without Giant - * yet. Once we can, we don't need to drop topology here either. - */ unit = alloc_unr(unithdr); - g_topology_unlock(); - mtx_lock(&Giant); dev = make_dev(&g_dev_cdevsw, unit2minor(unit), UID_ROOT, GID_OPERATOR, 0640, gp->name); if (pp->flags & G_PF_CANDELETE) dev->si_flags |= SI_CANDELETE; - mtx_unlock(&Giant); - g_topology_lock(); dev->si_iosize_max = MAXPHYS; gp->softc = dev; dev->si_drv1 = gp; |