Date: Fri, 18 Dec 2015 14:10:00 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292436 - head/sys/geom/sched Message-ID: <201512181410.tBIEA0FD099700@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512181410.tBIEA0FD099700>