mirror of
https://github.com/opnsense/src.git
synced 2026-02-18 18:20:26 -05:00
Revert rest of a5970a529c: use vrefact() when working on fp->f_vnode
Now, since O_PATH-opened file descriptors use use references instead of the hold references, vrefact() chahges from that revision can be reverted. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D34906
This commit is contained in:
parent
eeba222172
commit
362ff9867e
2 changed files with 4 additions and 4 deletions
|
|
@ -3087,7 +3087,7 @@ fgetvp_lookup(int fd, struct nameidata *ndp, struct vnode **vpp)
|
|||
error = ENOTDIR;
|
||||
goto out_free;
|
||||
}
|
||||
vref(vp);
|
||||
vrefact(vp);
|
||||
/*
|
||||
* XXX does not check for VDIR, handled by namei_setup
|
||||
*/
|
||||
|
|
@ -3537,7 +3537,7 @@ _fgetvp(struct thread *td, int fd, int flags, cap_rights_t *needrightsp,
|
|||
error = EINVAL;
|
||||
} else {
|
||||
*vpp = fp->f_vnode;
|
||||
vref(*vpp);
|
||||
vrefact(*vpp);
|
||||
}
|
||||
fdrop(fp, td);
|
||||
|
||||
|
|
@ -3573,7 +3573,7 @@ fgetvp_rights(struct thread *td, int fd, cap_rights_t *needrightsp,
|
|||
|
||||
*havecaps = caps;
|
||||
*vpp = fp->f_vnode;
|
||||
vref(*vpp);
|
||||
vrefact(*vpp);
|
||||
fdrop(fp, td);
|
||||
|
||||
return (0);
|
||||
|
|
|
|||
|
|
@ -907,7 +907,7 @@ sys_fchdir(struct thread *td, struct fchdir_args *uap)
|
|||
if (error != 0)
|
||||
return (error);
|
||||
vp = fp->f_vnode;
|
||||
vref(vp);
|
||||
vrefact(vp);
|
||||
fdrop(fp, td);
|
||||
vn_lock(vp, LK_SHARED | LK_RETRY);
|
||||
AUDIT_ARG_VNODE1(vp);
|
||||
|
|
|
|||
Loading…
Reference in a new issue