Changeset View
Changeset View
Standalone View
Standalone View
sys/ufs/ufs/ufs_vnops.c
Show First 20 Lines • Show All 276 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
struct vnode *vp = ap->a_vp; | struct vnode *vp = ap->a_vp; | ||||
struct inode *ip; | struct inode *ip; | ||||
if (vp->v_type == VCHR || vp->v_type == VBLK) | if (vp->v_type == VCHR || vp->v_type == VBLK) | ||||
return (EOPNOTSUPP); | return (EOPNOTSUPP); | ||||
ip = VTOI(vp); | ip = VTOI(vp); | ||||
vnode_create_vobject(vp, DIP(ip, i_size), ap->a_td); | |||||
mjg: should this migrate back below the append check? | |||||
Done Inline ActionsThis was intentional so that nullfs sees vm_object for its open as early as possible. kib: This was intentional so that nullfs sees vm_object for its open as early as possible. | |||||
if (vp->v_type == VREG && (vp->v_irflag & VIRF_PGREAD) == 0) { | |||||
VI_LOCK(vp); | |||||
vp->v_irflag |= VIRF_PGREAD; | |||||
VI_UNLOCK(vp); | |||||
} | |||||
/* | /* | ||||
* Files marked append-only must be opened for appending. | * Files marked append-only must be opened for appending. | ||||
*/ | */ | ||||
if ((ip->i_flags & APPEND) && | if ((ip->i_flags & APPEND) && | ||||
(ap->a_mode & (FWRITE | O_APPEND)) == FWRITE) | (ap->a_mode & (FWRITE | O_APPEND)) == FWRITE) | ||||
return (EPERM); | return (EPERM); | ||||
vnode_create_vobject(vp, DIP(ip, i_size), ap->a_td); | |||||
return (0); | return (0); | ||||
} | } | ||||
/* | /* | ||||
* Close called. | * Close called. | ||||
* | * | ||||
* Update the times on the inode. | * Update the times on the inode. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 2,655 Lines • Show Last 20 Lines |
should this migrate back below the append check?