The branch main has been updated by mjg:

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

commit 7c31de1a3cf06fa9b0e4b11cc7039a55bb433fa5
Author:     Mateusz Guzik <m...@freebsd.org>
AuthorDate: 2023-03-29 09:16:43 +0000
Commit:     Mateusz Guzik <m...@freebsd.org>
CommitDate: 2023-03-29 09:19:03 +0000

    ufs: stop doing refcount_init on made up creds
    
    creds are not using the refcount API for a long time now, but this
    previously failed to fail to compile because the type remained int.
    
    Now it broke due to conversion to long.
---
 sys/ufs/ufs/ufs_vnops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
index a027a22cc9ca..c13aec4e2175 100644
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -2073,7 +2073,7 @@ ufs_mkdir(
                                 * XXX This seems to never be accessed out of
                                 * our context so a stack variable is ok.
                                 */
-                               refcount_init(&ucred.cr_ref, 1);
+                               ucred.cr_ref = 1;
                                ucred.cr_uid = ip->i_uid;
                                ucred.cr_ngroups = 1;
                                ucred.cr_groups = &ucred_group;
@@ -2825,7 +2825,7 @@ ufs_makeinode(int mode, struct vnode *dvp, struct vnode 
**vpp,
                         * XXX This seems to never be accessed out of our
                         * context so a stack variable is ok.
                         */
-                       refcount_init(&ucred.cr_ref, 1);
+                       ucred.cr_ref = 1;
                        ucred.cr_uid = ip->i_uid;
                        ucred.cr_ngroups = 1;
                        ucred.cr_groups = &ucred_group;

Reply via email to