Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/ext2fs/ext2_vnops.c
Show First 20 Lines • Show All 2,067 Lines • ▼ Show 20 Lines | |||||
#ifdef INVARIANTS | #ifdef INVARIANTS | ||||
if (uio->uio_rw != UIO_READ) | if (uio->uio_rw != UIO_READ) | ||||
panic("%s: mode", "ext2_read"); | panic("%s: mode", "ext2_read"); | ||||
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 < vp->v_mount->mnt_maxsymlinklen) | ||||
panic("%s: short symlink", "ext2_read"); | panic("%s: short symlink", "ext2_read"); | ||||
} else if (vp->v_type != VREG && vp->v_type != VDIR) | } else if (vp->v_type != VREG) | ||||
panic("%s: type %d", "ext2_read", vp->v_type); | panic("%s: type %d", "ext2_read", vp->v_type); | ||||
#endif | #endif | ||||
orig_resid = uio->uio_resid; | orig_resid = uio->uio_resid; | ||||
KASSERT(orig_resid >= 0, ("ext2_read: uio->uio_resid < 0")); | KASSERT(orig_resid >= 0, ("ext2_read: uio->uio_resid < 0")); | ||||
if (orig_resid == 0) | if (orig_resid == 0) | ||||
return (0); | return (0); | ||||
KASSERT(uio->uio_offset >= 0, ("ext2_read: uio->uio_offset < 0")); | KASSERT(uio->uio_offset >= 0, ("ext2_read: uio->uio_offset < 0")); | ||||
fs = ip->i_e2fs; | fs = ip->i_e2fs; | ||||
▲ Show 20 Lines • Show All 278 Lines • Show Last 20 Lines |