diff options
author | jeff <jeff@FreeBSD.org> | 2002-09-26 02:54:30 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2002-09-26 02:54:30 +0000 |
commit | d6f7c28f2bf07e1b7dc0e285cf358a6bc0bddacc (patch) | |
tree | a351c99845a6a4a54499ec5c8ee346fe039f25ef /sys/fs | |
parent | 571ff8bdeb1aac765b40593d1e186dca57ae05eb (diff) | |
download | FreeBSD-src-d6f7c28f2bf07e1b7dc0e285cf358a6bc0bddacc.zip FreeBSD-src-d6f7c28f2bf07e1b7dc0e285cf358a6bc0bddacc.tar.gz |
- Fix a botch in previous commit; oldvp should not be unconditionally
assigned.
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/specfs/spec_vnops.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index e37096f..790a543 100644 --- a/sys/fs/specfs/spec_vnops.c +++ b/sys/fs/specfs/spec_vnops.c @@ -608,11 +608,12 @@ spec_close(ap) if (td && vp == td->td_proc->p_session->s_ttyvp) { SESS_LOCK(td->td_proc->p_session); VI_LOCK(vp); - if (vcount(vp) == 2 && (vp->v_iflag & VI_XLOCK) == 0) + if (vcount(vp) == 2 && (vp->v_iflag & VI_XLOCK) == 0) { td->td_proc->p_session->s_ttyvp = NULL; + oldvp = vp; + } VI_UNLOCK(vp); SESS_UNLOCK(td->td_proc->p_session); - oldvp = vp; } sx_xunlock(&proctree_lock); if (oldvp != NULL) |