diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2020-01-14 21:38:03 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2020-01-14 21:38:03 +0000 |
commit | d85ec68cf1b4bb477126ca779543851a7f95944a (patch) | |
tree | d0db04e8eed0456b7f9d151800b69a01b09d3f5c /sys | |
parent | f9c77970d8f911613e079666cef115797b80a388 (diff) |
In nfs_clearcommit() the loops over mnt_vnodelist and v_dirtyblkhd
do not delete anything. So the safe variant of foreach is not
necessary.
OK mpi@ millert@ tedu@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/nfs/nfs_subs.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c index 26439155739..a8feda1905c 100644 --- a/sys/nfs/nfs_subs.c +++ b/sys/nfs/nfs_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_subs.c,v 1.141 2020/01/10 10:33:35 bluhm Exp $ */ +/* $OpenBSD: nfs_subs.c,v 1.142 2020/01/14 21:38:02 bluhm Exp $ */ /* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */ /* @@ -1509,16 +1509,16 @@ netaddr_match(int family, union nethostaddr *haddr, struct mbuf *nam) void nfs_clearcommit(struct mount *mp) { - struct vnode *vp, *nvp; - struct buf *bp, *nbp; + struct vnode *vp; + struct buf *bp; int s; s = splbio(); loop: - TAILQ_FOREACH_SAFE(vp, &mp->mnt_vnodelist, v_mntvnodes, nvp) { + TAILQ_FOREACH(vp, &mp->mnt_vnodelist, v_mntvnodes) { if (vp->v_mount != mp) /* Paranoia */ goto loop; - LIST_FOREACH_SAFE(bp, &vp->v_dirtyblkhd, b_vnbufs, nbp) { + LIST_FOREACH(bp, &vp->v_dirtyblkhd, b_vnbufs) { if ((bp->b_flags & (B_BUSY | B_DELWRI | B_NEEDCOMMIT)) == (B_DELWRI | B_NEEDCOMMIT)) bp->b_flags &= ~B_NEEDCOMMIT; |