Index: vfs_mount.c =================================================================== RCS file: /usr/repo/src/sys/kern/vfs_mount.c,v retrieving revision 1.221 diff -u -p -r1.221 vfs_mount.c --- vfs_mount.c 31 Mar 2006 23:38:15 -0000 1.221 +++ vfs_mount.c 2 Jun 2006 18:49:33 -0000 @@ -83,7 +83,7 @@ static int vfs_mountroot_try(const char static int vfs_donmount(struct thread *td, int fsflags, struct uio *fsoptions); static void free_mntarg(struct mntarg *ma); -static void vfs_mount_destroy(struct mount *, struct thread *); +static void vfs_mount_destroy(struct mount *); static int vfs_getopt_pos(struct vfsoptlist *opts, const char *name); static int usermount = 0; @@ -485,11 +485,10 @@ vfs_mount_alloc(struct vnode *vp, struct * Destroy the mount struct previously allocated by vfs_mount_alloc(). */ static void -vfs_mount_destroy(struct mount *mp, struct thread *td) +vfs_mount_destroy(struct mount *mp) { int i; - lockmgr(&mp->mnt_lock, LK_RELEASE, NULL, td); MNT_ILOCK(mp); for (i = 0; mp->mnt_ref && i < 3; i++) msleep(mp, MNT_MTX(mp), PVFS, "mntref", hz); @@ -977,7 +976,8 @@ vfs_domount( VI_LOCK(vp); vp->v_iflag &= ~VI_MOUNT; VI_UNLOCK(vp); - vfs_mount_destroy(mp, td); + vfs_unbusy(mp, td); + vfs_mount_destroy(mp); vput(vp); } return (error); @@ -1179,7 +1179,8 @@ dounmount(mp, flags, td) vput(coveredvp); } vfs_event_signal(NULL, VQ_UNMOUNT, 0); - vfs_mount_destroy(mp, td); + lockmgr(&mp->mnt_lock, LK_RELEASE, NULL, td); + vfs_mount_destroy(mp); return (0); }