svn commit: r239442 - stable/8/sys/geom/virstor
Jim Harris
jimharris at FreeBSD.org
Mon Aug 20 16:13:17 UTC 2012
Author: jimharris
Date: Mon Aug 20 16:13:16 2012
New Revision: 239442
URL: http://svn.freebsd.org/changeset/base/239442
Log:
MRC r239021:
In virstor_ctl_stop(), check for a valid softc before trying to update
metadata.
Modified:
stable/8/sys/geom/virstor/g_virstor.c
Directory Properties:
stable/8/sys/ (props changed)
Modified: stable/8/sys/geom/virstor/g_virstor.c
==============================================================================
--- stable/8/sys/geom/virstor/g_virstor.c Mon Aug 20 16:11:13 2012 (r239441)
+++ stable/8/sys/geom/virstor/g_virstor.c Mon Aug 20 16:13:16 2012 (r239442)
@@ -231,6 +231,12 @@ virstor_ctl_stop(struct gctl_req *req, s
return;
}
sc = virstor_find_geom(cp, name);
+ if (sc == NULL) {
+ gctl_error(req, "Don't know anything about '%s'", name);
+ g_topology_unlock();
+ return;
+ }
+
LOG_MSG(LVL_INFO, "Stopping %s by the userland command",
sc->geom->name);
update_metadata(sc);
More information about the svn-src-stable
mailing list