diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2019-12-30 13:49:41 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2019-12-30 13:49:41 +0000 |
commit | d4dad62ee238119e85d660757706683c90506752 (patch) | |
tree | 318a87847f3579c5c6e9ad1956e817f4e1cd4835 /sys | |
parent | 12e39b74cfbbf7e50504695ba49608dfb54ea4d9 (diff) |
In vcount() a safe loop over vnodes was commited to 4.4BSD in 1994.
This is not necessary as the loop is restarted after vgone(). Switch
to SLIST_FOREACH without _SAFE.
OK visa@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_subr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 7806935464f..1edf218206f 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_subr.c,v 1.296 2019/12/27 22:17:01 bluhm Exp $ */ +/* $OpenBSD: vfs_subr.c,v 1.297 2019/12/30 13:49:40 bluhm Exp $ */ /* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */ /* @@ -1214,14 +1214,14 @@ vdevgone(int maj, int minl, int minh, enum vtype type) int vcount(struct vnode *vp) { - struct vnode *vq, *vnext; + struct vnode *vq; int count; loop: if ((vp->v_flag & VALIASED) == 0) return (vp->v_usecount); count = 0; - SLIST_FOREACH_SAFE(vq, vp->v_hashchain, v_specnext, vnext) { + SLIST_FOREACH(vq, vp->v_hashchain, v_specnext) { if (vq->v_rdev != vp->v_rdev || vq->v_type != vp->v_type) continue; /* |