- Don't destroy UMA zone on error in mdcreate_malloc(), because we need it
in mddestroy() to properly free already allocated memory. This fixes a panic when we want to create too big memory backed device with preallocate memory (-o reserve). - Remove redundant { }. MFC after: 1 week
This commit is contained in:
parent
980b4f7474
commit
1db17c6db2
@ -819,8 +819,6 @@ mdcreate_malloc(struct md_s *sc, struct md_ioctl *mdio)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (error != 0)
|
||||
uma_zdestroy(sc->uma);
|
||||
return (error);
|
||||
}
|
||||
|
||||
@ -945,9 +943,8 @@ mddestroy(struct md_s *sc, struct thread *td)
|
||||
FREAD : (FREAD|FWRITE), sc->cred, td);
|
||||
if (sc->cred != NULL)
|
||||
crfree(sc->cred);
|
||||
if (sc->object != NULL) {
|
||||
if (sc->object != NULL)
|
||||
vm_object_deallocate(sc->object);
|
||||
}
|
||||
if (sc->indir)
|
||||
destroy_indir(sc, sc->indir);
|
||||
if (sc->uma)
|
||||
|
Loading…
x
Reference in New Issue
Block a user