diff options
author | rwatson <rwatson@FreeBSD.org> | 2007-07-20 11:14:51 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2007-07-20 11:14:51 +0000 |
commit | f1da927af0f5b18310d9d34039a24690f10faa0e (patch) | |
tree | b13200fd85bc9db99e86ee97079d945a991ac20f /sys/fs/coda | |
parent | a8fa2791599a077d21258761c9e99d20efc67b50 (diff) | |
download | FreeBSD-src-f1da927af0f5b18310d9d34039a24690f10faa0e.zip FreeBSD-src-f1da927af0f5b18310d9d34039a24690f10faa0e.tar.gz |
Make sure we release the control vnode in Coda:
We allocate coda_ctlvp when /coda is mounted, but never release it.
During the unmount this vnode was marked as UNMOUNTING and when venus
is started a second time the system would hang, possibly waiting for
the old vnode to disappear.
So now we call vrele on the control vnode when file system is unmounted
to drop the reference we got during the mount. I'm pretty sure it is
also necessary to not skip the handling in coda_inactive for the control
vnode, it seems like that is the place we actually get rid of the vnode
once the refcount has dropped to 0.
Submitted by: Jan Harkes <jaharkes at cs dot cmu dot edu>
Approved by: re (kensmith)
Diffstat (limited to 'sys/fs/coda')
-rw-r--r-- | sys/fs/coda/coda_vfsops.c | 1 | ||||
-rw-r--r-- | sys/fs/coda/coda_vnops.c | 5 |
2 files changed, 1 insertions, 5 deletions
diff --git a/sys/fs/coda/coda_vfsops.c b/sys/fs/coda/coda_vfsops.c index ab2a3cf..8bbf024 100644 --- a/sys/fs/coda/coda_vfsops.c +++ b/sys/fs/coda/coda_vfsops.c @@ -227,6 +227,7 @@ coda_unmount(vfsp, mntflags, td) printf("coda_unmount: ROOT: vp %p, cp %p\n", mi->mi_rootvp, VTOC(mi->mi_rootvp)); #endif vrele(mi->mi_rootvp); + vrele(coda_ctlvp); active = coda_kill(vfsp, NOT_DOWNCALL); ASSERT_VOP_LOCKED(mi->mi_rootvp, "coda_unmount"); mi->mi_rootvp->v_vflag &= ~VV_ROOT; diff --git a/sys/fs/coda/coda_vnops.c b/sys/fs/coda/coda_vnops.c index f46e67f..19d31a6 100644 --- a/sys/fs/coda/coda_vnops.c +++ b/sys/fs/coda/coda_vnops.c @@ -745,11 +745,6 @@ coda_inactive(struct vop_inactive_args *ap) /* We don't need to send inactive to venus - DCS */ MARK_ENTRY(CODA_INACTIVE_STATS); - if (IS_CTL_VP(vp)) { - MARK_INT_SAT(CODA_INACTIVE_STATS); - return 0; - } - CODADEBUG(CODA_INACTIVE, myprintf(("in inactive, %s, vfsp %p\n", coda_f2s(&cp->c_fid), vp->v_mount));) |