diff options
| author | ozaki-r <ozaki-r@NetBSD.org> | 2017-03-14 09:03:08 +0000 |
|---|---|---|
| committer | ozaki-r <ozaki-r@NetBSD.org> | 2017-03-14 09:03:08 +0000 |
| commit | 49c4be2fa92aa73eb1f26c9e50f4d237f5e9fb81 (patch) | |
| tree | 7f56488f8375583f1184f34f8e78e9893c916832 /sys/compat/linux32/common/linux32_socket.c | |
| parent | fb6ed68a49041a8d1ace3421f8299ec1bb1e20bb (diff) | |
Use if_acquire and if_release instead of using psref API directly
- Provide if_release for consistency to if_acquire
- Use if_acquire and if_release for ifp iterations
- Make ifnet_psref_class static
Diffstat (limited to 'sys/compat/linux32/common/linux32_socket.c')
| -rw-r--r-- | sys/compat/linux32/common/linux32_socket.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/compat/linux32/common/linux32_socket.c b/sys/compat/linux32/common/linux32_socket.c index 11e761cae27..fb19e60542e 100644 --- a/sys/compat/linux32/common/linux32_socket.c +++ b/sys/compat/linux32/common/linux32_socket.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_socket.c,v 1.26 2016/08/01 03:15:30 ozaki-r Exp $ */ +/* $NetBSD: linux32_socket.c,v 1.27 2017/03/14 09:03:08 ozaki-r Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -33,7 +33,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux32_socket.c,v 1.26 2016/08/01 03:15:30 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_socket.c,v 1.27 2017/03/14 09:03:08 ozaki-r Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -441,7 +441,7 @@ linux32_getifconf(struct lwp *l, register_t *retval, void *data) s = pserialize_read_enter(); IFNET_READER_FOREACH(ifp) { struct ifaddr *ifa; - psref_acquire(&psref, &ifp->if_psref, ifnet_psref_class); + if_acquire(ifp, &psref); (void)strncpy(ifr.ifr_name, ifp->if_xname, sizeof(ifr.ifr_name)); @@ -477,7 +477,7 @@ linux32_getifconf(struct lwp *l, register_t *retval, void *data) ifa_release(ifa, &psref_ifa); } - psref_release(&psref, &ifp->if_psref, ifnet_psref_class); + if_release(ifp, &psref); } pserialize_read_exit(s); curlwp_bindx(bound); @@ -491,7 +491,7 @@ linux32_getifconf(struct lwp *l, register_t *retval, void *data) release_exit: pserialize_read_exit(s); - psref_release(&psref, &ifp->if_psref, ifnet_psref_class); + if_release(ifp, &psref); curlwp_bindx(bound); return error; } |
