summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMerlin Scholz <merlin@scholz.ruhr>2023-04-27 09:20:25 +0200
committerMerlin Scholz <merlin@scholz.ruhr>2023-05-29 01:53:33 +0200
commit39f5de8abf2520016bb7ce0ac0a775b3fd58853c (patch)
tree90cba540ddb418c7403aa142c8efbff30d3a65c8
parent0a87be88cd120979c5e397742a55cfb564cd9f8a (diff)
Fix log_memory sizeof in VFS subsystem
-rw-r--r--sys/kern/vfs_vnode.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/kern/vfs_vnode.c b/sys/kern/vfs_vnode.c
index 21857be018a..252d8e73ce5 100644
--- a/sys/kern/vfs_vnode.c
+++ b/sys/kern/vfs_vnode.c
@@ -1327,7 +1327,7 @@ again:
return error;
new_vip = vcache_alloc();
#ifdef LOCKDOC
- lockdoc_log_memory(1, "vnode_impl", new_vip, sizeof(vnode_impl_t));
+ lockdoc_log_memory(1, "vnode_impl", new_vip, sizeof(*new_vip));
#endif
new_vip->vi_key = vcache_key;
vp = VIMPL_TO_VNODE(new_vip);
@@ -1342,7 +1342,7 @@ again:
/* If another thread beat us inserting this node, retry. */
if (vip != new_vip) {
#ifdef LOCKDOC
- lockdoc_log_memory(0, "vnode_impl", new_vip, sizeof(vnode_impl_t));
+ lockdoc_log_memory(0, "vnode_impl", new_vip, sizeof(*new_vip));
#endif
vcache_dealloc(new_vip);
vfs_unbusy(mp);
@@ -1357,7 +1357,7 @@ again:
SLIST_REMOVE(&vcache_hashtab[hash & vcache_hashmask],
new_vip, vnode_impl, vi_hash);
#ifdef LOCKDOC
- lockdoc_log_memory(0, "vnode_impl", new_vip, sizeof(vnode_impl_t));
+ lockdoc_log_memory(0, "vnode_impl", new_vip, sizeof(*new_vip));
#endif
vcache_dealloc(new_vip);
vfs_unbusy(mp);
@@ -1404,7 +1404,7 @@ vcache_new(struct mount *mp, struct vnode *dvp, struct vattr *vap,
return error;
vip = vcache_alloc();
#ifdef LOCKDOC
- lockdoc_log_memory(1, "vnode_impl", vip, sizeof(vnode_impl_t));
+ lockdoc_log_memory(1, "vnode_impl", vip, sizeof(*vip));
#endif
vip->vi_key.vk_mount = mp;
vp = VIMPL_TO_VNODE(vip);
@@ -1415,7 +1415,7 @@ vcache_new(struct mount *mp, struct vnode *dvp, struct vattr *vap,
if (error) {
mutex_enter(&vcache_lock);
#ifdef LOCKDOC
- lockdoc_log_memory(0, "vnode_impl", vip, sizeof(vnode_impl_t));
+ lockdoc_log_memory(0, "vnode_impl", vip, sizeof(*vip));
#endif
vcache_dealloc(vip);
vfs_unbusy(mp);
@@ -1486,7 +1486,7 @@ vcache_rekey_enter(struct mount *mp, struct vnode *vp,
new_vip = vcache_alloc();
#ifdef LOCKDOC
- lockdoc_log_memory(1, "vnode_impl", new_vip, sizeof(vnode_impl_t));
+ lockdoc_log_memory(1, "vnode_impl", new_vip, sizeof(*new_vip));
#endif
new_vip->vi_key = new_vcache_key;
@@ -1495,10 +1495,10 @@ vcache_rekey_enter(struct mount *mp, struct vnode *vp,
vip = vcache_hash_lookup(&new_vcache_key, new_hash);
if (vip != NULL) {
#ifdef LOCKDOC
- lockdoc_log_memory(0, "vnode_impl", new_vip, sizeof(vnode_impl_t));
+ lockdoc_log_memory(0, "vnode_impl", new_vip, sizeof(*new_vip));
#endif
vcache_dealloc(new_vip);
- return EEXIST;.()
+ return EEXIST;
}
SLIST_INSERT_HEAD(&vcache_hashtab[new_hash & vcache_hashmask],
new_vip, vi_hash);
@@ -1564,7 +1564,7 @@ vcache_rekey_exit(struct mount *mp, struct vnode *vp,
SLIST_REMOVE(&vcache_hashtab[new_hash & vcache_hashmask],
new_vip, vnode_impl, vi_hash);
#ifdef LOCKDOC
- lockdoc_log_memory(0, "vnode_impl", new_vip, sizeof(vnode_impl_t));
+ lockdoc_log_memory(0, "vnode_impl", new_vip, sizeof(*new_vip));
#endif
vcache_dealloc(new_vip);
}