Date: Fri, 24 Mar 2023 17:47:44 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 13262b07a069 - main - fdesc_lookup(): drop fdropped Message-ID: <202303241747.32OHlikG075548@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=13262b07a06910edd5e58e6bb2e1d4786a7b7d8e commit 13262b07a06910edd5e58e6bb2e1d4786a7b7d8e Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2023-03-23 19:30:04 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2023-03-24 17:47:22 +0000 fdesc_lookup(): drop fdropped Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D39207 --- sys/fs/fdescfs/fdesc_vnops.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index 2713b070426c..1c4b6d0c6cdb 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -291,7 +291,6 @@ fdesc_lookup(struct vop_lookup_args *ap) int nlen = cnp->cn_namelen; u_int fd, fd1; int error; - bool fdropped; struct vnode *fvp; if ((cnp->cn_flags & ISLASTCN) && @@ -335,7 +334,6 @@ fdesc_lookup(struct vop_lookup_args *ap) */ if ((error = fget(td, fd, &cap_no_rights, &fp)) != 0) goto bad; - fdropped = false; /* * Make sure we do not deadlock looking up the dvp itself. @@ -351,19 +349,17 @@ fdesc_lookup(struct vop_lookup_args *ap) arg.ix = FD_DESC + fd; arg.fp = fp; arg.td = td; - arg.fdropped = fdropped; + arg.fdropped = false; error = vn_vget_ino_gen(dvp, fdesc_get_ino_alloc, &arg, LK_EXCLUSIVE, &fvp); - fdropped = arg.fdropped; - if (!fdropped) { + if (!arg.fdropped) { /* * In case we're holding the last reference to the file, the dvp * will be re-acquired. */ VOP_UNLOCK(dvp); fdrop(fp, td); - fdropped = true; vn_lock(dvp, LK_RETRY | LK_EXCLUSIVE); fvp = dvp;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202303241747.32OHlikG075548>