summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2008-10-31 16:49:17 +0000
committerderaadt <deraadt@openbsd.org>2008-10-31 16:49:17 +0000
commit33f943bbe5ed395fa8558becbb4de1bf36edd67b (patch)
tree8173949ebe578fc0e002477c2416a3e27f5ce721
parentsmall but compact page for drm; oga can fill the rest in as he goes (diff)
downloadwireguard-openbsd-33f943bbe5ed395fa8558becbb4de1bf36edd67b.tar.xz
wireguard-openbsd-33f943bbe5ed395fa8558becbb4de1bf36edd67b.zip
checkdirs() walks allproc and calls sleeping functions if directories have
to be snapped. Change it so that everytime it sleeps it restarts from the top of the list. ok art
-rw-r--r--sys/kern/vfs_syscalls.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index fee38c2fae1..021bd8414f9 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_syscalls.c,v 1.149 2008/08/08 19:49:09 thib Exp $ */
+/* $OpenBSD: vfs_syscalls.c,v 1.150 2008/10/31 16:49:17 deraadt Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */
/*
@@ -330,17 +330,20 @@ checkdirs(struct vnode *olddp)
return;
if (VFS_ROOT(olddp->v_mountedhere, &newdp))
panic("mount: lost mount");
+again:
LIST_FOREACH(p, &allproc, p_list) {
fdp = p->p_fd;
if (fdp->fd_cdir == olddp) {
vrele(fdp->fd_cdir);
VREF(newdp);
fdp->fd_cdir = newdp;
+ goto again;
}
if (fdp->fd_rdir == olddp) {
vrele(fdp->fd_rdir);
VREF(newdp);
fdp->fd_rdir = newdp;
+ goto again;
}
}
if (rootvnode == olddp) {