diff options
| author | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2006-06-02 20:29:02 +0000 |
|---|---|---|
| committer | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2006-06-02 20:29:02 +0000 |
| commit | 1f58dd49568d0022ac0ae357636aa2efa90c12f4 (patch) | |
| tree | fd7902f1c1a7c6a46207a9fea578d3de2f366c93 /sys | |
| parent | 16d878cc99efc07781a49b1db1a33ed09018d139 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/kern/vfs_mount.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 3f43dd77bc85..205ef6fc6f08 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -83,7 +83,7 @@ static int vfs_mountroot_try(const char *mountfrom); 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; @@ -486,11 +486,10 @@ vfs_mount_alloc(struct vnode *vp, struct vfsconf *vfsp, * 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); @@ -1009,7 +1008,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); @@ -1211,7 +1211,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); } |
