From nobody Fri Jul 26 11:15:59 2024 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 4WVlYW6jb1z5Rwhw; Fri, 26 Jul 2024 11:15:59 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WVlYW66DKz4Ysb; Fri, 26 Jul 2024 11:15:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721992559; 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=ji2haGNKfSxW79W4nv99SDfNQu7j8bzwsob+FkbEQdE=; b=bvNeK8dAHV7CBthdDnpnBPmobOVh/vOfs7PbUwu9uzsbw4/J5xQBEpi72lxnhDkpS/kGjZ kWU1FprhwvvUuAEu1zQoWjnAEfyiXegBRUQkJ2hw4utpbwVh3QAG6ah7FQjb6xcy+h8cUw LGdIXlmIzKcawoln2mi2e4koRlbVKjTbhZjwb8B5mWHcBXg/x90lElBoXhhlLvYqoo2OXq cs+MhFGP7o6AqdyktjdVUQkEWOh6awtpYsSiro0tXLx/FyHLG09USYygkuKzMckWjOYLf6 gwQkxQKH/gYsdJGuSaN3oKRA03jmiYD3Xm1hcuiW/Q8MYrNRAWvyj3HDJbzVYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721992559; a=rsa-sha256; cv=none; b=qV3V6YskTUW9nlHQVPDJtdxnxKOuDESsDN8ZOIYy6JaH0JMlQGhjSz/jI80YJSs52S6tUk xd8nmqmX2PwcnjUqaYICTr35o5YIvLafa2h161AaFgEW9UzZUISXjiGt/4SBfTF7tUGfeq KJkpKXO/QGpZQXdXzgiZgQf/D1QIdFwBCp6lKLueGEFtC4x/1Z2RHCbsPYf1N9um6Smb6C kcHYjDkExdPxEEYlkkXaNfTH7BD9JaZtow4mGRz9D0xBKbHDuMoztmr1Pr7iWnfoOapWO5 LZgKAERiaLrzYqJ/N3kRUe5Kh5xMabfMr9DG/Q9/c41Q0+zzxkHEecJJU/nwfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721992559; 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=ji2haGNKfSxW79W4nv99SDfNQu7j8bzwsob+FkbEQdE=; b=Sg6OEI8IV+TFQ+q/Jk67aPs9eVSpdobUei82cl3k9EU8XDkU9NnTMIdPGURs+yIpJLSZ9u kh6nLJ9UAK0tLTsY7Ky5Z20klWR/fmzXE5KG4FDsnAXqKtBqaiBBuA5Zc5bBvNP07IguJ/ 9u2Q49QafmUbMyyZZOHgS9hwMZRON/ScKWU9qiYPl55WZZWd2y+aDpylNAxOKXaTCKG+4j H/bxz49EQgIy/n6mzW1CH88g4lldyGOmJ1eSoVPSBvxio80bQc7aeuiWnmpH+wZB7lVpD0 dN3uC7nlvybUAlmw8MuZSWT9/1TLGLim68QzFuydcArQqAM0iPuQhByOqnCXOA== 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 4WVlYW5bbtzLdT; Fri, 26 Jul 2024 11:15:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46QBFxrd036887; Fri, 26 Jul 2024 11:15:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46QBFxnZ036884; Fri, 26 Jul 2024 11:15:59 GMT (envelope-from git) Date: Fri, 26 Jul 2024 11:15:59 GMT Message-Id: <202407261115.46QBFxnZ036884@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konrad Witaszczyk Subject: git: 5c3af1d697dc - main - nullfs: Use an a_gen field to cast to vop_generic_args 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: def X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c3af1d697dc9d1bfe8f0a5ab9206a6b88e4bfe7 Auto-Submitted: auto-generated The branch main has been updated by def: URL: https://cgit.FreeBSD.org/src/commit/?id=5c3af1d697dc9d1bfe8f0a5ab9206a6b88e4bfe7 commit 5c3af1d697dc9d1bfe8f0a5ab9206a6b88e4bfe7 Author: Konrad Witaszczyk AuthorDate: 2022-11-09 15:26:56 +0000 Commit: Konrad Witaszczyk CommitDate: 2024-07-26 11:14:32 +0000 nullfs: Use an a_gen field to cast to vop_generic_args Instead of casting a vop_F_args object to vop_generic_args, use a vop_F_args.a_gen field when calling null_bypass(). This way we don't hardcode the vop_generic_args data type in the callers of null_bypass(). Before this change, there were 3 null_bypass() calls using a vop_F_args.a_gen field and 5 null_bypass() calls using a cast to vop_generic_args. This change makes all null_bypass() calls consistent and easier to maintain. Pointed out by: jrtc27 Reviewed by: kib, oshogbo Accepted by: oshogbo (mentor) Differential Revision: https://reviews.freebsd.org/D37359 --- sys/fs/nullfs/null_vnops.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c index 4747b1dd5b82..bdf82432a2fb 100644 --- a/sys/fs/nullfs/null_vnops.c +++ b/sys/fs/nullfs/null_vnops.c @@ -528,7 +528,7 @@ null_setattr(struct vop_setattr_args *ap) } } - return (null_bypass((struct vop_generic_args *)ap)); + return (null_bypass(&ap->a_gen)); } /* @@ -539,7 +539,7 @@ null_stat(struct vop_stat_args *ap) { int error; - if ((error = null_bypass((struct vop_generic_args *)ap)) != 0) + if ((error = null_bypass(&ap->a_gen)) != 0) return (error); ap->a_sb->st_dev = ap->a_vp->v_mount->mnt_stat.f_fsid.val[0]; @@ -551,7 +551,7 @@ null_getattr(struct vop_getattr_args *ap) { int error; - if ((error = null_bypass((struct vop_generic_args *)ap)) != 0) + if ((error = null_bypass(&ap->a_gen)) != 0) return (error); ap->a_vap->va_fsid = ap->a_vp->v_mount->mnt_stat.f_fsid.val[0]; @@ -584,7 +584,7 @@ null_access(struct vop_access_args *ap) break; } } - return (null_bypass((struct vop_generic_args *)ap)); + return (null_bypass(&ap->a_gen)); } static int @@ -610,7 +610,7 @@ null_accessx(struct vop_accessx_args *ap) break; } } - return (null_bypass((struct vop_generic_args *)ap)); + return (null_bypass(&ap->a_gen)); } /*