Fix forced mdconfig -du. E.g. the following would previously
result in panic: mdconfig -af blah.img -o force mount /dev/md0 /mnt mdconfig -du 0 Reviewed by: scottl Approved by: rwatson (mentor) Sponsored by: FreeBSD Foundation
This commit is contained in:
parent
3bd6a14307
commit
41c8b468e6
@ -374,8 +374,11 @@ g_md_access(struct g_provider *pp, int r, int w, int e)
|
||||
struct md_s *sc;
|
||||
|
||||
sc = pp->geom->softc;
|
||||
if (sc == NULL)
|
||||
if (sc == NULL) {
|
||||
if (r <= 0 && w <= 0 && e <= 0)
|
||||
return (0);
|
||||
return (ENXIO);
|
||||
}
|
||||
r += pp->acr;
|
||||
w += pp->acw;
|
||||
e += pp->ace;
|
||||
|
Loading…
Reference in New Issue
Block a user