tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: cgdstrategy: divide fault in supervisor mode



Michael van Elst wrote:
> Ah, maybe then:
> 
> --- cgd.c       5 Aug 2016 08:24:46 -0000       1.110
> +++ cgd.c       13 Sep 2016 21:43:27 -0000
> @@ -305,13 +305,17 @@
>  static void
>  cgdstrategy(struct buf *bp)
>  {
> -       struct  cgd_softc *cs = getcgd_softc(bp->b_dev);
> -       struct  dk_softc *dksc = &cs->sc_dksc;
> -       struct  disk_geom *dg = &dksc->sc_dkdev.dk_geom;
> +       struct  cgd_softc *cs;
> +       struct  dk_softc *dksc;
> +       struct  disk_geom *dg;
>  
>         DPRINTF_FOLLOW(("cgdstrategy(%p): b_bcount = %ld\n", bp,
>             (long)bp->b_bcount));
>  
> +       GETCGD_SOFTC(cs, bp->b_dev);
> +       dksc = &cs->sc_dksc;
> +       dg = &dksc->sc_dkdev.dk_geom;
> +

It will not compile because cgdstrategy() returns void.

Alex


Home | Main Index | Thread Index | Old Index