Changeset View
Changeset View
Standalone View
Standalone View
sys/ufs/ffs/ffs_inode.c
Show First 20 Lines • Show All 243 Lines • ▼ Show 20 Lines | ffs_truncate(vp, length, flags, cred) | ||||
int offset, size, level, nblocks; | int offset, size, level, nblocks; | ||||
int i, error, allerror, indiroff, waitforupdate; | int i, error, allerror, indiroff, waitforupdate; | ||||
u_long key; | u_long key; | ||||
off_t osize; | off_t osize; | ||||
ip = VTOI(vp); | ip = VTOI(vp); | ||||
ump = VFSTOUFS(vp->v_mount); | ump = VFSTOUFS(vp->v_mount); | ||||
fs = ump->um_fs; | fs = ump->um_fs; | ||||
bo = &vp->v_bufobj; | bo = vp2bo(vp); | ||||
ASSERT_VOP_LOCKED(vp, "ffs_truncate"); | ASSERT_VOP_LOCKED(vp, "ffs_truncate"); | ||||
if (length < 0) | if (length < 0) | ||||
return (EINVAL); | return (EINVAL); | ||||
if (length > fs->fs_maxfilesize) | if (length > fs->fs_maxfilesize) | ||||
return (EFBIG); | return (EFBIG); | ||||
#ifdef QUOTA | #ifdef QUOTA | ||||
▲ Show 20 Lines • Show All 557 Lines • Show Last 20 Lines |