In virstor_ctl_stop(), check for a valid softc before trying to update
metadata. Sponsored by: Intel Reported and tested by: Marcelo Gondim <gondim at bsdinfo dot com dot br> PR: kern/170199 MFC after: 3 days
This commit is contained in:
parent
0046805a58
commit
c1d00eabe8
@ -235,6 +235,12 @@ virstor_ctl_stop(struct gctl_req *req, struct g_class *cp)
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user