Changeset View
Changeset View
Standalone View
Standalone View
sys/ufs/ufs/ufs_extattr.c
Show First 20 Lines • Show All 332 Lines • ▼ Show 20 Lines | ufs_extattr_enable_with_open(struct ufsmount *ump, struct vnode *vp, | ||||
error = VOP_OPEN(vp, FREAD|FWRITE, td->td_ucred, td, NULL); | error = VOP_OPEN(vp, FREAD|FWRITE, td->td_ucred, td, NULL); | ||||
if (error) { | if (error) { | ||||
printf("ufs_extattr_enable_with_open.VOP_OPEN(): failed " | printf("ufs_extattr_enable_with_open.VOP_OPEN(): failed " | ||||
"with %d\n", error); | "with %d\n", error); | ||||
VOP_UNLOCK(vp, 0); | VOP_UNLOCK(vp, 0); | ||||
return (error); | return (error); | ||||
} | } | ||||
VOP_ADD_WRITECOUNT(vp, 1); | error = VOP_ADD_WRITECOUNT(vp, 1); | ||||
if (error != 0) { | |||||
VOP_CLOSE(vp, FREAD | FWRITE, td->td_ucred, td); | |||||
VOP_UNLOCK(vp, 0); | |||||
return (error); | |||||
} | |||||
CTR3(KTR_VFS, "%s: vp %p v_writecount increased to %d", __func__, vp, | CTR3(KTR_VFS, "%s: vp %p v_writecount increased to %d", __func__, vp, | ||||
vp->v_writecount); | vp->v_writecount); | ||||
vref(vp); | vref(vp); | ||||
VOP_UNLOCK(vp, 0); | VOP_UNLOCK(vp, 0); | ||||
error = ufs_extattr_enable(ump, attrnamespace, attrname, vp, td); | error = ufs_extattr_enable(ump, attrnamespace, attrname, vp, td); | ||||
▲ Show 20 Lines • Show All 953 Lines • Show Last 20 Lines |