mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-06 13:09:50 +00:00
Create a vnode object when the file is opened. Trust that we did so.
This commit is contained in:
parent
b3a4d73ebe
commit
f74b3b1f6c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=140778
@ -332,20 +332,6 @@ ufs_extattr_enable_with_open(struct ufsmount *ump, struct vnode *vp,
|
||||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* XXX: Note, should VOP_CLOSE() if VOP_CREATEVOBJECT() fails, but due
|
||||
* to a similar piece of code in vn_open(), we don't.
|
||||
*/
|
||||
if (vn_canvmio(vp) == TRUE)
|
||||
if ((error = VOP_CREATEVOBJECT(vp, td->td_ucred, td)) != 0) {
|
||||
/*
|
||||
* XXX: bug replicated from vn_open(): should
|
||||
* VOP_CLOSE() here.
|
||||
*/
|
||||
VOP_UNLOCK(vp, 0, td);
|
||||
return (error);
|
||||
}
|
||||
|
||||
vp->v_writecount++;
|
||||
|
||||
vref(vp);
|
||||
|
@ -253,6 +253,8 @@ ufs_open(struct vop_open_args *ap)
|
||||
if ((VTOI(vp)->i_flags & APPEND) &&
|
||||
(ap->a_mode & (FWRITE | O_APPEND)) == FWRITE)
|
||||
return (EPERM);
|
||||
/* XXX: if we have the size we should pass it for speed */
|
||||
vnode_create_vobject(vp, 0, ap->a_td);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user