Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/ext2fs/ext2_inode.c
Show First 20 Lines • Show All 240 Lines • ▼ Show 20 Lines | ext2_ind_truncate(struct vnode *vp, off_t length, int flags, struct ucred *cred, | ||||
int error, i, allerror; | int error, i, allerror; | ||||
off_t osize; | off_t osize; | ||||
#ifdef INVARIANTS | #ifdef INVARIANTS | ||||
struct bufobj *bo; | struct bufobj *bo; | ||||
#endif | #endif | ||||
oip = VTOI(ovp); | oip = VTOI(ovp); | ||||
#ifdef INVARIANTS | #ifdef INVARIANTS | ||||
bo = &ovp->v_bufobj; | bo = vp2bo(ovp); | ||||
#endif | #endif | ||||
fs = oip->i_e2fs; | fs = oip->i_e2fs; | ||||
osize = oip->i_size; | osize = oip->i_size; | ||||
/* | /* | ||||
* Lengthen the size of the file. We must ensure that the | * Lengthen the size of the file. We must ensure that the | ||||
* last byte of the file is allocated. Since the smallest | * last byte of the file is allocated. Since the smallest | ||||
* value of osize is 0, length will be at least 1. | * value of osize is 0, length will be at least 1. | ||||
▲ Show 20 Lines • Show All 388 Lines • Show Last 20 Lines |