diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-03-05 21:48:58 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-03-05 21:48:58 +0000 |
commit | 52f635294dc2220b27898d3db1703c9464b92fb1 (patch) | |
tree | 5c2d6cca90a4bcc953c4c704201e7c2d7c08188e /sys/compat/netbsd | |
parent | 84fa77ca902d7934ca42a7fdd806497b643a8421 (diff) |
Use more queue macros rather than doing it by hand; ok otto@ krw@
Diffstat (limited to 'sys/compat/netbsd')
-rw-r--r-- | sys/compat/netbsd/netbsd_file.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/compat/netbsd/netbsd_file.c b/sys/compat/netbsd/netbsd_file.c index 0c8c8ee252f..47e7e326f4f 100644 --- a/sys/compat/netbsd/netbsd_file.c +++ b/sys/compat/netbsd/netbsd_file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netbsd_file.c,v 1.6 2005/11/30 10:35:07 pedro Exp $ */ +/* $OpenBSD: netbsd_file.c,v 1.7 2006/03/05 21:48:56 miod Exp $ */ /* $NetBSD: freebsd_file.c,v 1.3 1996/05/03 17:03:09 christos Exp $ */ /* @@ -632,9 +632,10 @@ netbsd_sys_getfsstat(p, v, retval) sfsp = (caddr_t)SCARG(uap, buf); count = 0; simple_lock(&mountlist_slock); - for (mp = mountlist.cqh_first; mp != (void *)&mountlist; mp = nmp) { + for (mp = CIRCLEQ_FIRST(&mountlist); mp != CIRCLEQ_END(&mountlist); + mp = nmp) { if (vfs_busy(mp, LK_NOWAIT, &mountlist_slock)) { - nmp = mp->mnt_list.cqe_next; + nmp = CIRCLEQ_NEXT(mp, mnt_list); continue; } if (sfsp && count < maxcount) { @@ -647,7 +648,7 @@ netbsd_sys_getfsstat(p, v, retval) flags == 0) && (error = VFS_STATFS(mp, sp, p))) { simple_lock(&mountlist_slock); - nmp = mp->mnt_list.cqe_next; + nmp = CIRCLEQ_NEXT(mp, mnt_list); vfs_unbusy(mp); continue; } @@ -663,7 +664,7 @@ netbsd_sys_getfsstat(p, v, retval) } count++; simple_lock(&mountlist_slock); - nmp = mp->mnt_list.cqe_next; + nmp = CIRCLEQ_NEXT(mp, mnt_list); vfs_unbusy(mp); } simple_unlock(&mountlist_slock); |