svn commit: r292436 - head/sys/geom/sched
Warner Losh
imp at FreeBSD.org
Fri Dec 18 14:10:01 UTC 2015
Author: imp
Date: Fri Dec 18 14:10:00 2015
New Revision: 292436
URL: https://svnweb.freebsd.org/changeset/base/292436
Log:
It turns out that it's OK to sleep in this context, so use M_WAITOK
for the softc for the delay module.
Noticed by: rpokala@
Modified:
head/sys/geom/sched/gs_delay.c
Modified: head/sys/geom/sched/gs_delay.c
==============================================================================
--- head/sys/geom/sched/gs_delay.c Fri Dec 18 11:20:50 2015 (r292435)
+++ head/sys/geom/sched/gs_delay.c Fri Dec 18 14:10:00 2015 (r292436)
@@ -201,8 +201,7 @@ g_delay_init(struct g_geom *geom)
{
struct g_delay_softc *sc;
- /* XXX check whether we can sleep */
- sc = malloc(sizeof *sc, M_GEOM_SCHED, M_NOWAIT | M_ZERO);
+ sc = malloc(sizeof *sc, M_GEOM_SCHED, M_WAITOK | M_ZERO);
sc->sc_geom = geom;
bioq_init(&sc->sc_bioq);
callout_init(&sc->sc_wait, CALLOUT_MPSAFE);
More information about the svn-src-head
mailing list