git: 3122e54a4f4b - stable/13 - Revert rest of a5970a529c2d95271: use vrefact() when working on fp->f_vnode
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 19 Apr 2022 20:23:16 UTC
The branch stable/13 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=3122e54a4f4bcd1f11c3002421fead631915f45b
commit 3122e54a4f4bcd1f11c3002421fead631915f45b
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-04-13 23:39:57 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2022-04-19 20:22:54 +0000
Revert rest of a5970a529c2d95271: use vrefact() when working on fp->f_vnode
(cherry picked from commit 362ff9867e9f0856a0f24f91e5fc6b9b3ecff8e9)
---
sys/kern/kern_descrip.c | 6 +++---
sys/kern/vfs_syscalls.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index fe5103fc35d9..9d73417b7a3d 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -3180,7 +3180,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
*/
@@ -3601,7 +3601,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);
@@ -3637,7 +3637,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);
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index d90dd72c8ead..1463bbea87bc 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -896,7 +896,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);