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)
This commit is contained in:
parent
e69aee3117
commit
825eaf3470
@ -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;
|
||||
|
@ -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));)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user