summaryrefslogtreecommitdiffstats
path: root/sys/fs/coda
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2008-01-19 15:40:46 +0000
committerrwatson <rwatson@FreeBSD.org>2008-01-19 15:40:46 +0000
commit1d78104fa012fbba92798ea6818421e3e000999a (patch)
treee9bb79f7f763115fbc3c2c9624208e7bb8095015 /sys/fs/coda
parentfc2cdfa748fab5134e09aac384b0adbe00fae841 (diff)
downloadFreeBSD-src-1d78104fa012fbba92798ea6818421e3e000999a.zip
FreeBSD-src-1d78104fa012fbba92798ea6818421e3e000999a.tar.gz
Zero mi_rotovp and coda_ctlvp immediately after calling vrele() on the
vnodes during coda_unmount() in order to detect errant use of them after the vnode references may no longer be valid. No need to clear the VV_ROOT flag on mi_rootvp flag (especially after the vnode reference is no longer valid) as this isn't done on other file systems. MFC after: 3 days
Diffstat (limited to 'sys/fs/coda')
-rw-r--r--sys/fs/coda/coda_vfsops.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/fs/coda/coda_vfsops.c b/sys/fs/coda/coda_vfsops.c
index 7e827ab..ec0f80d 100644
--- a/sys/fs/coda/coda_vfsops.c
+++ b/sys/fs/coda/coda_vfsops.c
@@ -224,10 +224,10 @@ 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);
+ mi->mi_rootvp = NULL;
vrele(coda_ctlvp);
+ coda_ctlvp = NULL;
active = coda_kill(vfsp, NOT_DOWNCALL);
- ASSERT_VOP_LOCKED(mi->mi_rootvp, "coda_unmount");
- mi->mi_rootvp->v_vflag &= ~VV_ROOT;
error = vflush(mi->mi_vfsp, 0, FORCECLOSE, td);
#ifdef CODA_VERBOSE
printf("coda_unmount: active = %d, vflush active %d\n", active, error);
@@ -240,7 +240,6 @@ coda_unmount(vfsp, mntflags, td)
/* No more vfsp's to hold onto */
mi->mi_vfsp = NULL;
- mi->mi_rootvp = NULL;
if (error)
MARK_INT_FAIL(CODA_UMOUNT_STATS);
OpenPOWER on IntegriCloud