Changeset View
Changeset View
Standalone View
Standalone View
sys/ufs/ffs/ffs_vnops.c
Show First 20 Lines • Show All 909 Lines • ▼ Show 20 Lines | /* XXX is uio->uio_offset the right thing here? */ | ||||
if (error) { | if (error) { | ||||
if (ioflag & IO_UNIT) { | if (ioflag & IO_UNIT) { | ||||
(void)ffs_truncate(vp, osize, | (void)ffs_truncate(vp, osize, | ||||
IO_NORMAL | (ioflag & IO_SYNC), ap->a_cred); | IO_NORMAL | (ioflag & IO_SYNC), ap->a_cred); | ||||
uio->uio_offset -= resid - uio->uio_resid; | uio->uio_offset -= resid - uio->uio_resid; | ||||
uio->uio_resid = resid; | uio->uio_resid = resid; | ||||
} | } | ||||
} else if (resid > uio->uio_resid && (ioflag & IO_SYNC)) { | } else if (resid > uio->uio_resid && (ioflag & IO_SYNC)) { | ||||
if (!(ioflag & IO_DATASYNC) || | |||||
(ip->i_flags & (IN_SIZEMOD | IN_IBLKDATA))) | |||||
error = ffs_update(vp, 1); | error = ffs_update(vp, 1); | ||||
if (ffs_fsfail_cleanup(VFSTOUFS(vp->v_mount), error)) | if (ffs_fsfail_cleanup(VFSTOUFS(vp->v_mount), error)) | ||||
error = ENXIO; | error = ENXIO; | ||||
} | } | ||||
return (error); | return (error); | ||||
} | } | ||||
/* | /* | ||||
* Extended attribute area reading. | * Extended attribute area reading. | ||||
▲ Show 20 Lines • Show All 897 Lines • Show Last 20 Lines |