Source-Changes-D archive

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

Re: CVS commit: src/sys/dev/dkwedge



> Module Name:    src
> Committed By:   mlelstv
> Date:           Tue Sep 27 17:04:52 UTC 2022
> 
> Modified Files:
>         src/sys/dev/dkwedge: dk.c
> 
> Log Message:
> Remove bogus assertions.
> 
> @@ -1221,8 +1221,6 @@ dklastclose(struct dkwedge_softc *sc)
>  
>         KASSERT(mutex_owned(&sc->sc_dk.dk_openlock));
>         KASSERT(mutex_owned(&sc->sc_parent->dk_rawlock));
> -       KASSERT(sc->sc_parent->dk_rawopens > 0);
> -       KASSERT(sc->sc_parent->dk_rawvp != NULL);
>  
>         if (--sc->sc_parent->dk_rawopens == 0) {
>                 struct vnode *const vp = sc->sc_parent->dk_rawvp;

If these assertions are bogus, please add a comment explaining:

(a) how we can legitimately enter a state where the assertions are
    violated, and

(b) how this logic is supposed to work when dk_rawopens wraps around
    from 0 to UINT_MAX and we try to dk_close_parent(NULL, ...).

Otherwise, please restore these assertions.


Home | Main Index | Thread Index | Old Index