diff options
author | 2019-12-25 12:31:12 +0000 | |
---|---|---|
committer | 2019-12-25 12:31:12 +0000 | |
commit | 638b8534bb858e8c610b4d9d4bfaf1c1f9ef1e50 (patch) | |
tree | c9251ba433160d50ed199f893b75fa8be5f582b1 | |
parent | WSDISPLAYIO_GTYPE is u_int not int (diff) | |
download | wireguard-openbsd-638b8534bb858e8c610b4d9d4bfaf1c1f9ef1e50.tar.xz wireguard-openbsd-638b8534bb858e8c610b4d9d4bfaf1c1f9ef1e50.zip |
Use FOREACH macro to iterate over mnt_vnodelist.
OK millert@ visa@ benno@
-rw-r--r-- | sys/nfs/nfs_subs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c index e7695774bfb..ff86b8a09a6 100644 --- a/sys/nfs/nfs_subs.c +++ b/sys/nfs/nfs_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_subs.c,v 1.139 2018/11/30 09:24:57 claudio Exp $ */ +/* $OpenBSD: nfs_subs.c,v 1.140 2019/12/25 12:31:12 bluhm Exp $ */ /* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */ /* @@ -1515,10 +1515,9 @@ nfs_clearcommit(struct mount *mp) s = splbio(); loop: - for (vp = LIST_FIRST(&mp->mnt_vnodelist); vp != NULL; vp = nvp) { + LIST_FOREACH_SAFE(vp, &mp->mnt_vnodelist, v_mntvnodes, nvp) { if (vp->v_mount != mp) /* Paranoia */ goto loop; - nvp = LIST_NEXT(vp, v_mntvnodes); LIST_FOREACH_SAFE(bp, &vp->v_dirtyblkhd, b_vnbufs, nbp) { if ((bp->b_flags & (B_BUSY | B_DELWRI | B_NEEDCOMMIT)) == (B_DELWRI | B_NEEDCOMMIT)) |