git: cd46e980134f - main - cred: fix struct credbatch to use long for refcount
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 29 Mar 2025 22:09:47 UTC
The branch main has been updated by glebius:
URL: https://cgit.FreeBSD.org/src/commit/?id=cd46e980134f6fc765b28ee9c8bf41e8fc1b0261
commit cd46e980134f6fc765b28ee9c8bf41e8fc1b0261
Author: Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2025-03-29 22:09:15 +0000
Commit: Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2025-03-29 22:09:15 +0000
cred: fix struct credbatch to use long for refcount
This structure collects count from multiple cred structures. Of course it
can't use a smaller type.
PR: 283747
Reviewed by: olce, mjg, markj
Differential Revision: https://reviews.freebsd.org/D49562
Fixes: 37337709d3334f32650ba3a7c529fa013ed5e1f2
---
sys/kern/kern_prot.c | 2 +-
sys/sys/ucred.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 2517b2bc2d4d..cc140d28e13d 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -2365,7 +2365,7 @@ crunuse(struct thread *td)
}
static void
-crunusebatch(struct ucred *cr, int users, int ref)
+crunusebatch(struct ucred *cr, u_int users, long ref)
{
KASSERT(users > 0, ("%s: passed users %d not > 0 ; cred %p",
diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h
index 32fa942493a4..7d04ea7de97f 100644
--- a/sys/sys/ucred.h
+++ b/sys/sys/ucred.h
@@ -192,8 +192,8 @@ struct proc;
struct credbatch {
struct ucred *cred;
- int users;
- int ref;
+ u_int users;
+ long ref;
};
static inline void