Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Dec 2024 02:17:09 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: d841b67b4747 - stable/14 - vnode: Make the vop_vector reference a pointer to const
Message-ID:  <202412030217.4B32H9uj070619@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by markj:

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

commit d841b67b47479b19606768b348a6f99dacd64a98
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-11-25 22:38:22 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-12-03 01:02:10 +0000

    vnode: Make the vop_vector reference a pointer to const
    
    No functional change intended.
    
    MFC after:      1 week
    
    (cherry picked from commit cd048d5d8be736419df878c26e6e170b8569dd12)
---
 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 0cd48ea44747..2cf62a51e101 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -134,7 +134,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 0fff9a831756..b477bbc91c43 100644
--- a/sys/tools/vnode_if.awk
+++ b/sys/tools/vnode_if.awk
@@ -328,7 +328,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) {
@@ -392,7 +392,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("");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202412030217.4B32H9uj070619>