Changeset View
Changeset View
Standalone View
Standalone View
sys/ufs/ffs/ffs_vnops.c
Show First 20 Lines • Show All 669 Lines • ▼ Show 20 Lines | #endif | ||||
seqcount = ap->a_ioflag >> IO_SEQSHIFT; | seqcount = ap->a_ioflag >> IO_SEQSHIFT; | ||||
ip = VTOI(vp); | ip = VTOI(vp); | ||||
#ifdef INVARIANTS | #ifdef INVARIANTS | ||||
if (uio->uio_rw != UIO_READ) | if (uio->uio_rw != UIO_READ) | ||||
panic("ffs_read: mode"); | panic("ffs_read: mode"); | ||||
if (vp->v_type == VLNK) { | if (vp->v_type == VLNK) { | ||||
if ((int)ip->i_size < vp->v_mount->mnt_maxsymlinklen) | if ((int)ip->i_size < VFSTOUFS(vp->v_mount)->um_maxsymlinklen) | ||||
panic("ffs_read: short symlink"); | panic("ffs_read: short symlink"); | ||||
} else if (vp->v_type != VREG && vp->v_type != VDIR) | } else if (vp->v_type != VREG && vp->v_type != VDIR) | ||||
panic("ffs_read: type %d", vp->v_type); | panic("ffs_read: type %d", vp->v_type); | ||||
#endif | #endif | ||||
orig_resid = uio->uio_resid; | orig_resid = uio->uio_resid; | ||||
KASSERT(orig_resid >= 0, ("ffs_read: uio->uio_resid < 0")); | KASSERT(orig_resid >= 0, ("ffs_read: uio->uio_resid < 0")); | ||||
if (orig_resid == 0) | if (orig_resid == 0) | ||||
return (0); | return (0); | ||||
▲ Show 20 Lines • Show All 1,411 Lines • Show Last 20 Lines |