From nobody Wed Jul 05 21:55:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxD4L4Gh0z4lmbx; Wed, 5 Jul 2023 21:55:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QxD4L3sNGz3xTR; Wed, 5 Jul 2023 21:55:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688594146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F39x2McGGDiE5Mu5ixGj/Dh/Iy/rCt0h0miHARX4Xn8=; b=hCA3Sl/rsTQiDYxIzvUNOVMlm0uip7fgdkxe/zY7Ez8+FBiIaY0hMRsTmMath637f2i0w2 cRcVrmkcLwkjDGcud6algqtpdXt24FU+ITlCmhhYet1NSHDvWE/DB8pua2jjqcSzZPUFBj CVxJgHPUVG4cyvJ+uz1Kt0ZOZYC0fnLsK/EYWWpXHgJvd9zx88VwFogayiqbaaeVfQWipO bqSr63f5QZ0f26SVy/RYNFhTGLSj/GP8F+DX9qvVjGO8Pc6uXZdlb/trxkcymCP5YKC2nj 85JyTslqUBd2uWDDaewVemHTzy3KItr8jM5LLkFuRoTe4hT3PhnisfMKRXiD7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688594146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F39x2McGGDiE5Mu5ixGj/Dh/Iy/rCt0h0miHARX4Xn8=; b=PF9wPMJ4g4jQpyDDS307bB6X8zKApnHlxA55ULbea/F76pC8EAsG8IusqVpYCey5ZQohly bBK1//x8HwCJjwILIzXVhnDyIlTwa8oLClRFkIH8/Ae6xTuqL3WUO6NzOhFLyPEeNw9dPS FP1L7O6dGnNjWLsEJJUHFqM+dIlO3niM2ie65tSJ/LSijptfSnuCCfIczuCpTj32H8LMow fICiPpGJ0WNEayHcYfTgPf39LdTZcH2S7xB+UGxMKxDnpvA2EXVXQDS7Xh1o/Ib26Jalzl cI/96letxwPcLX9awX2PPGi073N8JZHOJdy8krwUy5jTdXJ6Lgvm8XmVTgprcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688594146; a=rsa-sha256; cv=none; b=T69VBQ6HeO7fQQg1VGeTOe+pMwxyqAsmlyLz8tlJxhY3iSK5pn6422Ogzge2PAtBobICVc 9thhPDB0ZhUj8pEiRTKCHmwrnOM6YntDTsH7ncIyEj9cYsiw4l0CpDgDxB39G9KRCI9tBf w/0c9t1SM6a76oR6qS847Er/LSIkDewPYYAf2LCtl5GyoBlGwzYTvi2tZLpwADDS+K4BUs yHK9QcI3x0wouJZdLkwax50DN6RfQU6Z82ITsEXvro+vCFH30naXYfgD0bx22kq7W8dr8M hDKbKsUnTBGaSdUHfdx/MAPtrdDx9Izkg0WSBfLPn7KalmDW2zzN4gRGBiKywg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxD4L2pZbzWTV; Wed, 5 Jul 2023 21:55:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 365LtkVt045323; Wed, 5 Jul 2023 21:55:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365LtkLX045322; Wed, 5 Jul 2023 21:55:46 GMT (envelope-from git) Date: Wed, 5 Jul 2023 21:55:46 GMT Message-Id: <202307052155.365LtkLX045322@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 0724cf3862e6 - main - vfs: whack dpunlocked var in vfs_lookup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0724cf3862e6fa607efdb18df85d9ef58bfb7464 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=0724cf3862e6fa607efdb18df85d9ef58bfb7464 commit 0724cf3862e6fa607efdb18df85d9ef58bfb7464 Author: Mateusz Guzik AuthorDate: 2023-07-05 21:52:07 +0000 Commit: Mateusz Guzik CommitDate: 2023-07-05 21:55:24 +0000 vfs: whack dpunlocked var in vfs_lookup It is redundant given the bad_unlocked goto label. --- sys/kern/vfs_lookup.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 44fc91c1bd11..588ef88d24df 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -926,7 +926,6 @@ vfs_lookup(struct nameidata *ndp) int wantparent; /* 1 => wantparent or lockparent flag */ int rdonly; /* lookup read-only flag bit */ int error = 0; - int dpunlocked = 0; /* dp has already been unlocked */ int relookup = 0; /* do not consume the path component */ struct componentname *cnp = &ndp->ni_cnd; int lkflags_save; @@ -1342,10 +1341,8 @@ good: vput(dp); if (vn_lock(vp_crossmp, LK_SHARED | LK_NOWAIT)) panic("vp_crossmp exclusively locked or reclaimed"); - if (error != 0) { - dpunlocked = 1; - goto bad2; - } + if (error != 0) + goto bad_unlocked; ndp->ni_vp = dp = tdp; } while ((vn_irflag_read(dp) & VIRF_MOUNTPOINT) != 0); @@ -1457,8 +1454,7 @@ bad2: vrele(ndp->ni_dvp); } bad: - if (!dpunlocked) - vput(dp); + vput(dp); bad_unlocked: ndp->ni_vp = NULL; return (error);