diff options
author | jhb <jhb@FreeBSD.org> | 2012-01-05 19:00:36 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2012-01-05 19:00:36 +0000 |
commit | 4ef366671a65893ccd19a3fc76c415ab0d9a25f2 (patch) | |
tree | e3a128009150d5297d5066b93f051a1a5e2375a5 /sys/kern/kern_uuid.c | |
parent | 219e62f17ed5852c0d61721758ef94a0587939f4 (diff) | |
download | FreeBSD-src-4ef366671a65893ccd19a3fc76c415ab0d9a25f2.zip FreeBSD-src-4ef366671a65893ccd19a3fc76c415ab0d9a25f2.tar.gz |
Convert all users of IF_ADDR_LOCK to use new locking macros that specify
either a read lock or write lock.
Reviewed by: bz
MFC after: 2 weeks
Diffstat (limited to 'sys/kern/kern_uuid.c')
-rw-r--r-- | sys/kern/kern_uuid.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_uuid.c b/sys/kern/kern_uuid.c index 693bb25..14ace89 100644 --- a/sys/kern/kern_uuid.c +++ b/sys/kern/kern_uuid.c @@ -98,20 +98,20 @@ uuid_node(uint16_t *node) IFNET_RLOCK_NOSLEEP(); TAILQ_FOREACH(ifp, &V_ifnet, if_link) { /* Walk the address list */ - IF_ADDR_LOCK(ifp); + IF_ADDR_RLOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { sdl = (struct sockaddr_dl*)ifa->ifa_addr; if (sdl != NULL && sdl->sdl_family == AF_LINK && sdl->sdl_type == IFT_ETHER) { /* Got a MAC address. */ bcopy(LLADDR(sdl), node, UUID_NODE_LEN); - IF_ADDR_UNLOCK(ifp); + IF_ADDR_RUNLOCK(ifp); IFNET_RUNLOCK_NOSLEEP(); CURVNET_RESTORE(); return; } } - IF_ADDR_UNLOCK(ifp); + IF_ADDR_RUNLOCK(ifp); } IFNET_RUNLOCK_NOSLEEP(); |