diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c --- a/sys/fs/cd9660/cd9660_vnops.c +++ b/sys/fs/cd9660/cd9660_vnops.c @@ -600,7 +600,8 @@ brelse (bp); uio->uio_offset = idp->uio_off; - *ap->a_eofflag = idp->eofflag; + if (ap->a_eofflag != NULL) + *ap->a_eofflag = idp->eofflag; free(idp, M_TEMP); diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -1944,7 +1944,7 @@ bool closefufh = false; pid_t pid = curthread->td_proc->p_pid; - if (ap->a_eofflag) + if (ap->a_eofflag != NULL) *ap->a_eofflag = 0; if (fuse_isdeadfs(vp)) { return (EXTERROR(ENXIO, "This FUSE session is about " @@ -1997,7 +1997,7 @@ *ap->a_cookies = NULL; } } - if (err == 0 && tresid == uio->uio_resid) + if (err == 0 && tresid == uio->uio_resid && ap->a_eofflag != NULL) *ap->a_eofflag = 1; return err; diff --git a/sys/fs/udf/udf_vnops.c b/sys/fs/udf/udf_vnops.c --- a/sys/fs/udf/udf_vnops.c +++ b/sys/fs/udf/udf_vnops.c @@ -889,7 +889,8 @@ } /* tell the calling layer whether we need to be called again */ - *a->a_eofflag = uiodir.eofflag; + if (a->a_eofflag != NULL) + *a->a_eofflag = uiodir.eofflag; if (error < 0) error = 0; diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -2407,7 +2407,8 @@ return (EINVAL); ip = VTOI(vp); if (ip->i_effnlink == 0) { - *ap->a_eofflag = 1; + if (ap->a_eofflag != NULL) + *ap->a_eofflag = 1; return (0); } if (ap->a_ncookies != NULL) { @@ -2512,7 +2513,7 @@ *ap->a_cookies = NULL; } } - if (error == 0 && ap->a_eofflag) + if (error == 0 && ap->a_eofflag != NULL) *ap->a_eofflag = ip->i_size <= uio->uio_offset; return (error); }