summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-02-14 17:59:44 +0000
committerphk <phk@FreeBSD.org>2004-02-14 17:59:44 +0000
commitc9a89db245795132bf8c0a936121078738b7ee58 (patch)
tree6bed7f7ab8f9c60e20a813ccb876e5132efbd88c /sys/geom
parent14df0ab802fa99c6a6879ab2191050793193ce65 (diff)
downloadFreeBSD-src-c9a89db245795132bf8c0a936121078738b7ee58.zip
FreeBSD-src-c9a89db245795132bf8c0a936121078738b7ee58.tar.gz
Do not check error code from closing ->access() calls, we know they succeed.
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/bde/g_bde.c4
-rw-r--r--sys/geom/geom_bsd.c2
-rw-r--r--sys/geom/geom_fox.c11
3 files changed, 9 insertions, 8 deletions
diff --git a/sys/geom/bde/g_bde.c b/sys/geom/bde/g_bde.c
index 4b4e947..84a7b8b 100644
--- a/sys/geom/bde/g_bde.c
+++ b/sys/geom/bde/g_bde.c
@@ -226,7 +226,6 @@ g_bde_destroy_geom(struct gctl_req *req, struct g_class *mp, struct g_geom *gp)
{
struct g_consumer *cp;
struct g_provider *pp;
- int error;
struct g_bde_softc *sc;
g_trace(G_T_TOPOLOGY, "g_bde_destroy_geom(%s, %s)", mp->name, gp->name);
@@ -244,8 +243,7 @@ g_bde_destroy_geom(struct gctl_req *req, struct g_class *mp, struct g_geom *gp)
KASSERT(cp != NULL, ("NULL consumer"));
sc->dead = 1;
wakeup(sc);
- error = g_access(cp, -1, -1, -1);
- KASSERT(error == 0, ("error on close"));
+ g_access(cp, -1, -1, -1);
g_detach(cp);
g_destroy_consumer(cp);
while (sc->dead != 2 && !LIST_EMPTY(&pp->consumers))
diff --git a/sys/geom/geom_bsd.c b/sys/geom/geom_bsd.c
index ce74c9f..bbf4022 100644
--- a/sys/geom/geom_bsd.c
+++ b/sys/geom/geom_bsd.c
@@ -569,7 +569,7 @@ g_bsd_taste(struct g_class *mp, struct g_provider *pp, int flags)
} while (0);
/* Success or failure, we can close our provider now. */
- error = g_access(cp, -1, 0, 0);
+ g_access(cp, -1, 0, 0);
/* If we have configured any providers, return the new geom. */
if (gsp->nprovider > 0) {
diff --git a/sys/geom/geom_fox.c b/sys/geom/geom_fox.c
index 2c4b3d0..d546fc3 100644
--- a/sys/geom/geom_fox.c
+++ b/sys/geom/geom_fox.c
@@ -90,8 +90,7 @@ g_fox_select_path(void *arg, int flag)
cp1 = LIST_NEXT(sc->opath, consumer);
- error = g_access(sc->opath, -sc->cr, -sc->cw, -(sc->ce + 1));
- KASSERT(error == 0, ("Failed close of old path %d", error));
+ g_access(sc->opath, -sc->cr, -sc->cw, -(sc->ce + 1));
/*
* The attempt to reopen it with a exclusive count
@@ -290,8 +289,12 @@ g_fox_access(struct g_provider *pp, int dr, int dw, int de)
g_topology_assert();
gp = pp->geom;
sc = gp->softc;
- if (sc == NULL)
- return (ENXIO);
+ if (sc == NULL) {
+ if (dr <= 0 && dw <= 0 && de <= 0)
+ return (0);
+ else
+ return (ENXIO);
+ }
if (sc->cr == 0 && sc->cw == 0 && sc->ce == 0) {
/*
OpenPOWER on IntegriCloud