From 21b5ddcd2ee53e7f6c2d3bb1ad0f212507f2bdd1 Mon Sep 17 00:00:00 2001 From: kris Date: Mon, 26 Mar 2007 21:47:03 +0000 Subject: 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 --- sys/geom/geom_dev.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'sys/geom') 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; -- cgit v1.1