From nobody Wed Dec 08 00:12:45 2021 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 F3CA018C31F2; Wed, 8 Dec 2021 00:12:45 +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 4J7yKn53mCz4Yb5; Wed, 8 Dec 2021 00:12:45 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 8E6CE135F; Wed, 8 Dec 2021 00:12:45 +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 1B80CjwO029101; Wed, 8 Dec 2021 00:12:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B80Cjr6029100; Wed, 8 Dec 2021 00:12:45 GMT (envelope-from git) Date: Wed, 8 Dec 2021 00:12:45 GMT Message-Id: <202112080012.1B80Cjr6029100@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jason A. Harmening" Subject: git: 6d8420d444b5 - main - Remove unnecessary thread argument from unionfs_nodeget() and _noderem() 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: jah X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d8420d444b583b55147e5e8fdba89d16ede1f1f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638922365; 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=z+/qp9glD/LzYECaj55TPtBK87sfSbo8ada5d9YXt6c=; b=GOy7SswSVZc/UNsfcUGikntKMSiOUu43RBiJWzSofusVgCPKRXA5Iz02+gOjIZik3FE2fu iHHOjIs6GDJYqI2Sp+/7cIRSacXjd6rS9nhTPEcidyIuafyA3K3sOjHHLyk1XGGNAY+Y4y XtmUx8VqFFgj4Aqq99DCU9IKyqB5EcVijk74bI6tyf9zhLKRFiVj2+XyZYFTxRQTbXT8NM Y1xaMFlDE5QaYre+9/Sr3AaVtXgmyeo1YqG8hneklfcJFx0nTM3GRv5a90ExkLSW4DplK3 g/TdCwNiCA/pY80oD7PZT8u8bxZywz2LlJq9D0ij79ogNSUPPSWLxubVX+7DGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638922365; a=rsa-sha256; cv=none; b=U6qGAx2t86E9awOVW6/KCJSdWv9ZE7X9an/qCoAX+G8O832ZdFrPUhaDpI2E9GMHTIrxpj VDpGnGP8gTHo4eV7/atpz4fqBNzrubHVZ7hxb5TyZhl5lRIJ028gojbfDwSsYMYGidVOxU QKXsaTtGmz+m40H9bZA8NvIuvM5WnV9GfteesQzLIhKWBEwW1EJLDag2+uICLZM3Pn+vGu mLdACOw6vwpWI3r7jmXdpyuVwvLMVfYVyEjhuwk6bQCiGOk65laZ10WbTn8UoIbe6EerJ0 eUqJqiGtWE2Bmc4jKeSlsjK3XvoifHPQM/T//Fkhjf8cL0Vxg3T/sq+AbrJgEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=6d8420d444b583b55147e5e8fdba89d16ede1f1f commit 6d8420d444b583b55147e5e8fdba89d16ede1f1f Author: Jason A. Harmening AuthorDate: 2021-11-15 16:40:17 +0000 Commit: Jason A. Harmening CommitDate: 2021-12-08 00:20:02 +0000 Remove unnecessary thread argument from unionfs_nodeget() and _noderem() Also remove a couple of write-only variables found by the recent clang update. No functional change intended. Discussed with: kib Differential Revision: https://reviews.freebsd.org/D33008 --- sys/fs/unionfs/union.h | 5 ++--- sys/fs/unionfs/union_subr.c | 4 ++-- sys/fs/unionfs/union_vfsops.c | 4 +--- sys/fs/unionfs/union_vnops.c | 18 +++++++----------- 4 files changed, 12 insertions(+), 19 deletions(-) diff --git a/sys/fs/unionfs/union.h b/sys/fs/unionfs/union.h index eda24c1b8333..34d323dff511 100644 --- a/sys/fs/unionfs/union.h +++ b/sys/fs/unionfs/union.h @@ -130,9 +130,8 @@ unionfs_check_vnode(struct vnode *vp, const char *file __unused, int unionfs_init(struct vfsconf *); int unionfs_uninit(struct vfsconf *); int unionfs_nodeget(struct mount *, struct vnode *, struct vnode *, - struct vnode *, struct vnode **, struct componentname *, - struct thread *); -void unionfs_noderem(struct vnode *, struct thread *); + struct vnode *, struct vnode **, struct componentname *); +void unionfs_noderem(struct vnode *); void unionfs_get_node_status(struct unionfs_node *, struct thread *, struct unionfs_node_status **); void unionfs_tryrem_node_status(struct unionfs_node *, diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index 195d74583443..551553fd8b20 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -299,7 +299,7 @@ unionfs_nodeget_cleanup(struct vnode *vp, void *arg) int unionfs_nodeget(struct mount *mp, struct vnode *uppervp, struct vnode *lowervp, struct vnode *dvp, struct vnode **vpp, - struct componentname *cnp, struct thread *td) + struct componentname *cnp) { char *path; struct unionfs_mount *ump; @@ -426,7 +426,7 @@ unionfs_nodeget_out: * Clean up the unionfs node. */ void -unionfs_noderem(struct vnode *vp, struct thread *td) +unionfs_noderem(struct vnode *vp) { struct unionfs_node *unp, *unp_t1, *unp_t2; struct unionfs_node_hashhead *hd; diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c index da9b3cce46f3..ea49d1e189da 100644 --- a/sys/fs/unionfs/union_vfsops.c +++ b/sys/fs/unionfs/union_vfsops.c @@ -78,7 +78,6 @@ unionfs_domount(struct mount *mp) struct vnode *lowerrootvp; struct vnode *upperrootvp; struct unionfs_mount *ump; - struct thread *td; char *target; char *tmp; char *ep; @@ -105,7 +104,6 @@ unionfs_domount(struct mount *mp) copymode = UNIONFS_TRANSPARENT; /* default */ whitemode = UNIONFS_WHITE_ALWAYS; ndp = &nd; - td = curthread; if (mp->mnt_flag & MNT_ROOTFS) { vfs_mount_error(mp, "Cannot union mount root filesystem"); @@ -284,7 +282,7 @@ unionfs_domount(struct mount *mp) * Get the unionfs root vnode. */ error = unionfs_nodeget(mp, ump->um_uppervp, ump->um_lowervp, - NULLVP, &(ump->um_rootvp), NULL, td); + NULLVP, &(ump->um_rootvp), NULL); vrele(upperrootvp); if (error != 0) { free(ump, M_UNIONFSMNT); diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 93249b21ccb3..381e413e18ba 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -263,7 +263,7 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) (1 < cnp->cn_namelen || '.' != *(cnp->cn_nameptr))) { /* get unionfs vnode in order to create a new shadow dir. */ error = unionfs_nodeget(dvp->v_mount, NULLVP, lvp, dvp, &vp, - cnp, td); + cnp); if (error != 0) goto unionfs_lookup_cleanup; @@ -319,7 +319,7 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) */ else error = unionfs_nodeget(dvp->v_mount, uvp, lvp, - dvp, &vp, cnp, td); + dvp, &vp, cnp); if (error != 0) { UNIONFSDEBUG( "unionfs_lookup: Unable to create unionfs vnode."); @@ -383,7 +383,7 @@ unionfs_create(struct vop_create_args *ap) else { VOP_UNLOCK(vp); error = unionfs_nodeget(ap->a_dvp->v_mount, vp, NULLVP, - ap->a_dvp, ap->a_vpp, cnp, curthread); + ap->a_dvp, ap->a_vpp, cnp); vrele(vp); } } @@ -457,7 +457,7 @@ unionfs_mknod(struct vop_mknod_args *ap) else { VOP_UNLOCK(vp); error = unionfs_nodeget(ap->a_dvp->v_mount, vp, NULLVP, - ap->a_dvp, ap->a_vpp, cnp, curthread); + ap->a_dvp, ap->a_vpp, cnp); vrele(vp); } } @@ -1347,7 +1347,6 @@ unionfs_mkdir(struct vop_mkdir_args *ap) { struct unionfs_node *dunp; struct componentname *cnp; - struct thread *td; struct vnode *udvp; struct vnode *uvp; struct vattr va; @@ -1362,7 +1361,6 @@ unionfs_mkdir(struct vop_mkdir_args *ap) dunp = VTOUNIONFS(ap->a_dvp); cnp = ap->a_cnp; lkflags = cnp->cn_lkflags; - td = curthread; udvp = dunp->un_uppervp; if (udvp != NULLVP) { @@ -1379,7 +1377,7 @@ unionfs_mkdir(struct vop_mkdir_args *ap) VOP_UNLOCK(uvp); cnp->cn_lkflags = LK_EXCLUSIVE; error = unionfs_nodeget(ap->a_dvp->v_mount, uvp, NULLVP, - ap->a_dvp, ap->a_vpp, cnp, td); + ap->a_dvp, ap->a_vpp, cnp); cnp->cn_lkflags = lkflags; vrele(uvp); } @@ -1467,7 +1465,6 @@ unionfs_symlink(struct vop_symlink_args *ap) { struct unionfs_node *dunp; struct componentname *cnp; - struct thread *td; struct vnode *udvp; struct vnode *uvp; int error; @@ -1481,7 +1478,6 @@ unionfs_symlink(struct vop_symlink_args *ap) dunp = VTOUNIONFS(ap->a_dvp); cnp = ap->a_cnp; lkflags = cnp->cn_lkflags; - td = curthread; udvp = dunp->un_uppervp; if (udvp != NULLVP) { @@ -1490,7 +1486,7 @@ unionfs_symlink(struct vop_symlink_args *ap) VOP_UNLOCK(uvp); cnp->cn_lkflags = LK_EXCLUSIVE; error = unionfs_nodeget(ap->a_dvp->v_mount, uvp, NULLVP, - ap->a_dvp, ap->a_vpp, cnp, td); + ap->a_dvp, ap->a_vpp, cnp); cnp->cn_lkflags = lkflags; vrele(uvp); } @@ -1761,7 +1757,7 @@ unionfs_reclaim(struct vop_reclaim_args *ap) { /* UNIONFS_INTERNAL_DEBUG("unionfs_reclaim: enter\n"); */ - unionfs_noderem(ap->a_vp, curthread); + unionfs_noderem(ap->a_vp); /* UNIONFS_INTERNAL_DEBUG("unionfs_reclaim: leave\n"); */