git: 74aa6df1f63d - stable/13 - fdesc_lookup(): no need to vhold the dvp vnode

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Thu, 06 Apr 2023 18:04:29 UTC
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=74aa6df1f63d1c92a959e7c6bb9395e6f153cb5d

commit 74aa6df1f63d1c92a959e7c6bb9395e6f153cb5d
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2023-03-22 13:36:00 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2023-04-06 18:04:09 +0000

    fdesc_lookup(): no need to vhold the dvp vnode
    
    (cherry picked from commit 8d97282a394278d29883e7afa98ed6294efab35e)
---
 sys/fs/fdescfs/fdesc_vnops.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c
index 81b6690efc80..ae52ef5c3bea 100644
--- a/sys/fs/fdescfs/fdesc_vnops.c
+++ b/sys/fs/fdescfs/fdesc_vnops.c
@@ -374,13 +374,11 @@ fdesc_lookup(struct vop_lookup_args *ap)
 		 * In case we're holding the last reference to the file, the dvp
 		 * will be re-acquired.
 		 */
-		vhold(dvp);
 		VOP_UNLOCK(dvp);
 		fdrop(fp, td);
 		fdropped = true;
 
 		vn_lock(dvp, LK_RETRY | LK_EXCLUSIVE);
-		vdrop(dvp);
 		fvp = dvp;
 		if (error == 0 && VN_IS_DOOMED(dvp))
 			error = ENOENT;