summaryrefslogtreecommitdiff
path: root/sys/nfs
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2022-03-17 14:23:35 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2022-03-17 14:23:35 +0000
commit4ad2bbef46d93bf6f9a02ed42b0cb053d77b2580 (patch)
tree08a661a1d050f0b5b726da51a80d6f4e8d13aa35 /sys/nfs
parentf9fe30a36c2e53bb8a75bff1780a42f637d80144 (diff)
Use the refcnt API with struct ucred.
OK bluhm@
Diffstat (limited to 'sys/nfs')
-rw-r--r--sys/nfs/nfs_socket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c
index 53f813bcc1b..a20986e4a81 100644
--- a/sys/nfs/nfs_socket.c
+++ b/sys/nfs/nfs_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_socket.c,v 1.139 2022/02/22 01:15:02 guenther Exp $ */
+/* $OpenBSD: nfs_socket.c,v 1.140 2022/03/17 14:23:34 visa Exp $ */
/* $NetBSD: nfs_socket.c,v 1.27 1996/04/15 20:20:00 thorpej Exp $ */
/*
@@ -1493,7 +1493,7 @@ nfs_getreq(struct nfsrv_descript *nd, struct nfsd *nfsd, int has_header)
nfsm_adv(nfsm_rndup(len));
nfsm_dissect(tl, u_int32_t *, 3 * NFSX_UNSIGNED);
memset(&nd->nd_cr, 0, sizeof (struct ucred));
- nd->nd_cr.cr_ref = 1;
+ refcnt_init(&nd->nd_cr.cr_refcnt);
nd->nd_cr.cr_uid = fxdr_unsigned(uid_t, *tl++);
nd->nd_cr.cr_gid = fxdr_unsigned(gid_t, *tl++);
len = fxdr_unsigned(int, *tl);