git: cd048d5d8be7 - main - vnode: Make the vop_vector reference a pointer to const

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Tue, 26 Nov 2024 21:32:38 UTC
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=cd048d5d8be736419df878c26e6e170b8569dd12

commit cd048d5d8be736419df878c26e6e170b8569dd12
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-11-25 22:38:22 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-11-26 20:57:54 +0000

    vnode: Make the vop_vector reference a pointer to const
    
    No functional change intended.
    
    MFC after:      1 week
---
 sys/sys/vnode.h        | 2 +-
 sys/tools/vnode_if.awk | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index c929b4265552..42973adac287 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -132,7 +132,7 @@ struct vnode {
 	seqc_t	v_seqc;				/* i modification count */
 	uint32_t v_nchash;			/* u namecache hash */
 	u_int	v_hash;
-	struct	vop_vector *v_op;		/* u vnode operations vector */
+	const struct vop_vector *v_op;		/* u vnode operations vector */
 	void	*v_data;			/* u private data for fs */
 
 	/*
diff --git a/sys/tools/vnode_if.awk b/sys/tools/vnode_if.awk
index b8f616f08fd9..2326d0e28956 100644
--- a/sys/tools/vnode_if.awk
+++ b/sys/tools/vnode_if.awk
@@ -325,7 +325,7 @@ while ((getline < srcfile) > 0) {
 
 		# Print out function prototypes.
 		printh("int " uname "_AP(struct " name "_args *);");
-		printh("int " uname "_APV(struct vop_vector *vop, struct " name "_args *);");
+		printh("int " uname "_APV(const struct vop_vector *vop, struct " name "_args *);");
 		printh("");
 		printh("static __inline int " uname "(");
 		for (i = 0; i < numargs; ++i) {
@@ -389,7 +389,7 @@ while ((getline < srcfile) > 0) {
 		printc("");
 		printc("\treturn(" uname "_APV(a->a_" args[0] "->v_op, a));");
 		printc("}");
-		printc("\nint\n" uname "_APV(struct vop_vector *vop, struct " name "_args *a)");
+		printc("\nint\n" uname "_APV(const struct vop_vector *vop, struct " name "_args *a)");
 		printc("{");
 		printc("\tint rc;");
 		printc("");