Date: Sun, 1 Mar 2009 15:01:00 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r189236 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb ufs/ffs Message-ID: <200903011501.n21F10gv046543@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903011501.n21F10gv046543>