svn commit: r189236 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
dev/cxgb ufs/ffs
Edward Tomasz Napierala
trasz at FreeBSD.org
Sun Mar 1 07:01:02 PST 2009
Author: trasz
Date: Sun Mar 1 15:01:00 2009
New Revision: 189236
URL: http://svn.freebsd.org/changeset/base/189236
Log:
MFC r187894. Note that r188501 should be merged too.
Make sure the cdev doesn't go away while the filesystem is still mounted.
Otherwise dev2udev() could return garbage.
Reviewed by: kib
Approved by: rwatson (mentor)
Sponsored by: FreeBSD Foundation
Modified:
stable/7/sys/ (props changed)
stable/7/sys/contrib/pf/ (props changed)
stable/7/sys/dev/ath/ath_hal/ (props changed)
stable/7/sys/dev/cxgb/ (props changed)
stable/7/sys/ufs/ffs/ffs_vfsops.c
Modified: stable/7/sys/ufs/ffs/ffs_vfsops.c
==============================================================================
--- stable/7/sys/ufs/ffs/ffs_vfsops.c Sun Mar 1 14:57:33 2009 (r189235)
+++ stable/7/sys/ufs/ffs/ffs_vfsops.c Sun Mar 1 15:01:00 2009 (r189236)
@@ -641,6 +641,7 @@ ffs_mountfs(devvp, mp, td)
VOP_UNLOCK(devvp, 0, td);
if (error)
return (error);
+ dev_ref(dev);
if (devvp->v_rdev->si_iosize_max != 0)
mp->mnt_iosize_max = devvp->v_rdev->si_iosize_max;
if (mp->mnt_iosize_max > MAXPHYS)
@@ -921,6 +922,7 @@ out:
free(ump, M_UFSMNT);
mp->mnt_data = (qaddr_t)0;
}
+ dev_rel(dev);
return (error);
}
@@ -1107,6 +1109,7 @@ ffs_unmount(mp, mntflags, td)
g_topology_unlock();
PICKUP_GIANT();
vrele(ump->um_devvp);
+ dev_rel(ump->um_dev);
mtx_destroy(UFS_MTX(ump));
if (mp->mnt_gjprovider != NULL) {
free(mp->mnt_gjprovider, M_UFSMNT);
More information about the svn-src-stable
mailing list