Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/nullfs/null_vnops.c
Show First 20 Lines • Show All 690 Lines • ▼ Show 20 Lines | if (VTONULL(vp) == NULL && error == 0) { | ||||
ap->a_flags); | ap->a_flags); | ||||
} | } | ||||
VOP_UNLOCK(lvp, 0); | VOP_UNLOCK(lvp, 0); | ||||
error = vop_stdlock(ap); | error = vop_stdlock(ap); | ||||
} | } | ||||
vdrop(lvp); | vdrop(lvp); | ||||
} else { | } else { | ||||
VI_UNLOCK(vp); | VI_UNLOCK(vp); | ||||
error = vop_stdlock(ap); | error = vop_stdlock_vnlock(ap); | ||||
} | } | ||||
return (error); | return (error); | ||||
} | } | ||||
/* | /* | ||||
* We need to process our own vnode unlock and then clear the | * We need to process our own vnode unlock and then clear the | ||||
* interlock flag as it applies only to our vnode, not the | * interlock flag as it applies only to our vnode, not the | ||||
* vnodes below us on the stack. | * vnodes below us on the stack. | ||||
*/ | */ | ||||
static int | static int | ||||
null_unlock(struct vop_unlock_args *ap) | null_unlock(struct vop_unlock_args *ap) | ||||
{ | { | ||||
struct vnode *vp = ap->a_vp; | struct vnode *vp = ap->a_vp; | ||||
struct null_node *nn; | struct null_node *nn; | ||||
struct vnode *lvp; | struct vnode *lvp; | ||||
int error; | int error; | ||||
nn = VTONULL(vp); | nn = VTONULL(vp); | ||||
if (nn != NULL && (lvp = NULLVPTOLOWERVP(vp)) != NULL) { | if (nn != NULL && (lvp = NULLVPTOLOWERVP(vp)) != NULL) { | ||||
vholdnz(lvp); | vholdnz(lvp); | ||||
error = VOP_UNLOCK(lvp, 0); | error = VOP_UNLOCK(lvp, 0); | ||||
vdrop(lvp); | vdrop(lvp); | ||||
} else { | } else { | ||||
error = vop_stdunlock(ap); | error = vop_stdunlock_vnlock(ap); | ||||
} | } | ||||
return (error); | return (error); | ||||
} | } | ||||
/* | /* | ||||
* Do not allow the VOP_INACTIVE to be passed to the lower layer, | * Do not allow the VOP_INACTIVE to be passed to the lower layer, | ||||
* since the reference count on the lower vnode is not related to | * since the reference count on the lower vnode is not related to | ||||
▲ Show 20 Lines • Show All 189 Lines • ▼ Show 20 Lines | struct vop_vector null_vnodeops = { | ||||
.vop_access = null_access, | .vop_access = null_access, | ||||
.vop_accessx = null_accessx, | .vop_accessx = null_accessx, | ||||
.vop_advlockpurge = vop_stdadvlockpurge, | .vop_advlockpurge = vop_stdadvlockpurge, | ||||
.vop_bmap = VOP_EOPNOTSUPP, | .vop_bmap = VOP_EOPNOTSUPP, | ||||
.vop_getattr = null_getattr, | .vop_getattr = null_getattr, | ||||
.vop_getwritemount = null_getwritemount, | .vop_getwritemount = null_getwritemount, | ||||
.vop_inactive = null_inactive, | .vop_inactive = null_inactive, | ||||
.vop_need_inactive = null_need_inactive, | .vop_need_inactive = null_need_inactive, | ||||
.vop_islocked = vop_stdislocked, | .vop_islocked = vop_stdislocked_vnlock, | ||||
.vop_lock1 = null_lock, | .vop_lock1 = null_lock, | ||||
.vop_lookup = null_lookup, | .vop_lookup = null_lookup, | ||||
.vop_open = null_open, | .vop_open = null_open, | ||||
.vop_print = null_print, | .vop_print = null_print, | ||||
.vop_reclaim = null_reclaim, | .vop_reclaim = null_reclaim, | ||||
.vop_remove = null_remove, | .vop_remove = null_remove, | ||||
.vop_rename = null_rename, | .vop_rename = null_rename, | ||||
.vop_rmdir = null_rmdir, | .vop_rmdir = null_rmdir, | ||||
.vop_setattr = null_setattr, | .vop_setattr = null_setattr, | ||||
.vop_strategy = VOP_EOPNOTSUPP, | .vop_strategy = VOP_EOPNOTSUPP, | ||||
.vop_unlock = null_unlock, | .vop_unlock = null_unlock, | ||||
.vop_vptocnp = null_vptocnp, | .vop_vptocnp = null_vptocnp, | ||||
.vop_vptofh = null_vptofh, | .vop_vptofh = null_vptofh, | ||||
.vop_add_writecount = null_add_writecount, | .vop_add_writecount = null_add_writecount, | ||||
}; | }; |