diff options
author | phk <phk@FreeBSD.org> | 2003-08-02 10:11:58 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-08-02 10:11:58 +0000 |
commit | 4a97de3d538aa6a7a38d8b23e559632dee0f8f67 (patch) | |
tree | 1bbb190b54ec51c678d66e4aaf55600b478a82b0 /sys | |
parent | adb4818b648cfccea6a070d3a280297d953cfc73 (diff) | |
download | FreeBSD-src-4a97de3d538aa6a7a38d8b23e559632dee0f8f67.zip FreeBSD-src-4a97de3d538aa6a7a38d8b23e559632dee0f8f67.tar.gz |
Kick Giant compatibility one layer up.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/geom/geom_dev.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c index 2dc713a..a4b13b5 100644 --- a/sys/geom/geom_dev.c +++ b/sys/geom/geom_dev.c @@ -66,7 +66,7 @@ static struct cdevsw g_dev_cdevsw = { .d_strategy = g_dev_strategy, .d_name = "g_dev", .d_maj = GEOM_MAJOR, - .d_flags = D_DISK | D_TRACKCLOSE, + .d_flags = D_DISK | D_TRACKCLOSE | D_NOGIANT, }; static g_taste_t g_dev_taste; @@ -195,14 +195,12 @@ g_dev_open(dev_t dev, int flags, int fmt, struct thread *td) #else e = 0; #endif - DROP_GIANT(); g_topology_lock(); if (dev->si_devsw == NULL) error = ENXIO; /* We were orphaned */ else error = g_access_rel(cp, r, w, e); g_topology_unlock(); - PICKUP_GIANT(); g_waitidle(); if (!error) dev->si_bsize_phys = cp->provider->sectorsize; @@ -229,7 +227,6 @@ g_dev_close(dev_t dev, int flags, int fmt, struct thread *td) #else e = 0; #endif - DROP_GIANT(); g_topology_lock(); if (dev->si_devsw == NULL) error = ENXIO; /* We were orphaned */ @@ -250,7 +247,6 @@ g_dev_close(dev_t dev, int flags, int fmt, struct thread *td) "Completing close anyway, panic may happen later."); } g_topology_unlock(); - PICKUP_GIANT(); g_waitidle(); return (error); } @@ -278,7 +274,6 @@ g_dev_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td) error = 0; KASSERT(cp->acr || cp->acw, ("Consumer with zero access count in g_dev_ioctl")); - DROP_GIANT(); gio = NULL; i = IOCPARM_LEN(cmd); @@ -337,7 +332,6 @@ g_dev_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td) break; } - PICKUP_GIANT(); if (error == EDIRIOCTL) { KASSERT(gio != NULL, ("NULL gio but EDIRIOCTL")); KASSERT(gio->func != NULL, ("NULL function but EDIRIOCTL")); @@ -383,9 +377,7 @@ g_dev_done(struct bio *bp2) } bp->bio_resid = bp->bio_bcount - bp2->bio_completed; g_destroy_bio(bp2); - mtx_lock(&Giant); biodone(bp); - mtx_unlock(&Giant); } static void |