Do not check error code from closing ->access() calls, we know they succeed.
This commit is contained in:
parent
bfc37a5112
commit
281591449a
@ -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))
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user