vfs: assert that VI_TEXT_REF is not already set

This commit is contained in:
mjg 2020-08-16 18:45:31 +00:00
parent f3fbf861bc
commit 6fffc1360f

View File

@ -1186,6 +1186,7 @@ vop_stdset_text(struct vop_set_text_args *ap)
mp = vp->v_mount;
if (mp != NULL && (mp->mnt_kern_flag & MNTK_TEXT_REFS) != 0 &&
vp->v_writecount == 0) {
VNPASS((vp->v_iflag & VI_TEXT_REF) == 0, vp);
vp->v_iflag |= VI_TEXT_REF;
vrefl(vp);
}