From d841b67b47479b19606768b348a6f99dacd64a98 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Mon, 25 Nov 2024 22:38:22 +0000 Subject: [PATCH] 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 0cd48ea4474..2cf62a51e10 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 0fff9a83175..b477bbc91c4 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("");