From nobody Thu Jan 27 00:12:27 2022 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 D4AB8196AFF5; Thu, 27 Jan 2022 00:12:29 +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 4JkgyP0bsyz4bT8; Thu, 27 Jan 2022 00:12:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643242349; 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=CNhtPB7hCVvtcvl/ADOx+4Ish0fooiNlVtyvP5Dsoxw=; b=OtyIMOztOsYqDUPjNxnAjujRQhIOHtFJDVqLAhLCmMtTb2163q4y8j1/XIq8XXsHNhPwb3 hQyYtITYDp+Cm+H2eg6oGcpjKnIQ70M4SpEwItU64iKJXLqGAlK+GcsU2V+gQkOb7zAFxZ OOEIvv5ROGNobjXq0Ff3yMTz0W4jkwRuFP7I4iQ8NfptOsL0ptwvj5FLPkQjuS/VdCvsVz SdZfYlwAqHIkGJxfHEKhQ9tIA8CJ7YUjHZhzKiZtL46PseMYNpDU3QPbYJUVS7DgZG0RQX zx2fmuFKr3rU5JIywnWv0IMSmE23xbWNcsj9eTlEoA7Xc9QHrra19nLtLo+4vw== 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 DE8DA48F0; Thu, 27 Jan 2022 00:12:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20R0CREo002658; Thu, 27 Jan 2022 00:12:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20R0CR1i002657; Thu, 27 Jan 2022 00:12:27 GMT (envelope-from git) Date: Thu, 27 Jan 2022 00:12:27 GMT Message-Id: <202201270012.20R0CR1i002657@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: 3150cf0c1346 - main - unionfs: stop using insmntque1 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: 3150cf0c134651588cf83f9ea1fc0cd4a0c6ba4d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643242349; 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=CNhtPB7hCVvtcvl/ADOx+4Ish0fooiNlVtyvP5Dsoxw=; b=AkQx4M6H2fAeEcJv8/WOvIXpl/mLRIi0ZFf1BvXUgKk9Q0qqbwX1+q1IA05PpwRhj/pi2B PG6m56M+8HHoJxOrVVa78kyYblgFqHH5itUFJGZv7ngdhVmAnmQbL9esMlfb8EsQb6VLzN CXX8mpNGDHqIvVxHxGQqWXYu9bo2YNdyp5fdRBF790ZBCKzF0IKgfGyZ9abwOaJtGzBjVa onwZtOZEvNDHkqw2t6uJr9zr5FCDJsnpKBGcQ/DSv9ow2/FCFbJ4uRTYdxy8ANzIZAFYIi 3E4DXXP5j/QduC//pdg8zVFkxKamGIgXl9RDR0Q4tAypXaBedDPGH+3TJDS9vw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643242349; a=rsa-sha256; cv=none; b=nBwpTMEJmcCDTutVxjr/XsLA2ucgw+B2NMaSaNTITqw31IYDN5MC41o7y2u8ylHcoaq3TQ addDzEwhh0cQXWciDAR+Cs5fV5lTiYN4dYvZzGZvEpZArrJB5oZevs2vBovxO+rdBrYlOQ dQzOYm43FqFV+rjalGRp7olTNTBg+64N464s8/Oy/rAs+HHjfnVhlIL3krnKCDgVZOwBNE wcj9kWPtNW/qe8wG+pmzAnYnpoEEIq5SEqISThwCNSxJ0BOtu/4HMgLu2wglXIo3ed8a/h M74wF47eR5ok5RuMGgGL+NtlzyR3N5iDbqdjtNzQoBIFP3iLDYOJqWuTcXSz7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=3150cf0c134651588cf83f9ea1fc0cd4a0c6ba4d commit 3150cf0c134651588cf83f9ea1fc0cd4a0c6ba4d Author: Mateusz Guzik AuthorDate: 2022-01-26 23:57:32 +0000 Commit: Mateusz Guzik CommitDate: 2022-01-26 23:57:37 +0000 unionfs: stop using insmntque1 It adds nothing of value over insmntque. --- sys/fs/unionfs/union_subr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index c70e8eae5580..57b6051104de 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -256,9 +256,8 @@ unionfs_rem_cached_vnode(struct unionfs_node *unp, struct vnode *dvp) * This function will return with the caller's locks and references undone. */ static void -unionfs_nodeget_cleanup(struct vnode *vp, void *arg) +unionfs_nodeget_cleanup(struct vnode *vp, struct unionfs_node *unp) { - struct unionfs_node *unp; /* * Lock and reset the default vnode lock; vgone() expects a locked @@ -278,7 +277,6 @@ unionfs_nodeget_cleanup(struct vnode *vp, void *arg) vgone(vp); vput(vp); - unp = arg; if (unp->un_dvp != NULLVP) vrele(unp->un_dvp); if (unp->un_uppervp != NULLVP) @@ -388,9 +386,11 @@ unionfs_nodeget(struct mount *mp, struct vnode *uppervp, vp->v_vflag |= VV_ROOT; vn_lock_pair(lowervp, false, uppervp, false); - error = insmntque1(vp, mp, unionfs_nodeget_cleanup, unp); - if (error != 0) + error = insmntque(vp, mp); + if (error != 0) { + unionfs_nodeget_cleanup(vp, unp); return (error); + } if (lowervp != NULL && VN_IS_DOOMED(lowervp)) { vput(lowervp); unp->un_lowervp = NULL;