diff options
Diffstat (limited to 'sys/kern/vfs_syscalls.c')
-rw-r--r-- | sys/kern/vfs_syscalls.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 5f53eaeefdc..a36720daf91 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_syscalls.c,v 1.151 2008/11/01 20:34:09 deraadt Exp $ */ +/* $OpenBSD: vfs_syscalls.c,v 1.152 2008/11/11 02:11:25 tedu Exp $ */ /* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */ /* @@ -323,9 +323,8 @@ void checkdirs(struct vnode *olddp) { struct filedesc *fdp; - struct vnode *newdp; + struct vnode *newdp, *vp; struct proc *p; - int slept; if (olddp->v_usecount == 1) return; @@ -335,17 +334,17 @@ again: LIST_FOREACH(p, &allproc, p_list) { fdp = p->p_fd; if (fdp->fd_cdir == olddp) { - slept = vrele(fdp->fd_cdir); + vp = fdp->fd_cdir; VREF(newdp); fdp->fd_cdir = newdp; - if (slept) + if (vrele(vp)) goto again; } if (fdp->fd_rdir == olddp) { - slept = vrele(fdp->fd_rdir); + vp = fdp->fd_rdir; VREF(newdp); fdp->fd_rdir = newdp; - if (slept) + if (vrele(vp)) goto again; } } |