M_WAITOK is ok here, while I'm using M_WAITOK later in this function.
This commit is contained in:
parent
4a150a7afe
commit
dca201cdfb
@ -774,14 +774,7 @@ g_stripe_create(struct g_class *mp, const struct g_stripe_metadata *md,
|
||||
gp = g_new_geomf(mp, "%s.stripe", md->md_name);
|
||||
gp->softc = NULL; /* for a moment */
|
||||
|
||||
sc = malloc(sizeof(*sc), M_STRIPE, M_NOWAIT | M_ZERO);
|
||||
if (sc == NULL) {
|
||||
G_STRIPE_DEBUG(0, "Can't allocate memory for device %s.",
|
||||
gp->name);
|
||||
g_destroy_geom(gp);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
sc = malloc(sizeof(*sc), M_STRIPE, M_WAITOK | M_ZERO);
|
||||
gp->start = g_stripe_start;
|
||||
gp->spoiled = g_stripe_orphan;
|
||||
gp->orphan = g_stripe_orphan;
|
||||
|
Loading…
x
Reference in New Issue
Block a user