diff options
author | Jeff Roberson <jeff@FreeBSD.org> | 2006-03-31 03:54:20 +0000 |
---|---|---|
committer | Jeff Roberson <jeff@FreeBSD.org> | 2006-03-31 03:54:20 +0000 |
commit | 3bbd6d8ae6b131abe508cdec69e09315b7788af5 (patch) | |
tree | db33a736e9b94a3a4157303b09a71a143008ad95 /sys/ufs | |
parent | 94bc95db3ca6fcdc33ceee5b0704df9c523c4410 (diff) | |
download | src-3bbd6d8ae6b131abe508cdec69e09315b7788af5.tar.gz src-3bbd6d8ae6b131abe508cdec69e09315b7788af5.zip |
- Release the references acquired by VOP_GETWRITEMOUNT and vfs_getvfs().
Discussed with: tegge
Tested by: kris
Sponsored by: Isilon Systems, Inc.
Notes
Notes:
svn path=/head/; revision=157325
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_snapshot.c | 1 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index 16e953efb5ed..77e7ad13be06 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -259,6 +259,7 @@ restart: wrtmp = NULL; if (wrtmp != mp) panic("ffs_snapshot: mount mismatch"); + vfs_rel(wrtmp); if (vn_start_write(NULL, &wrtmp, V_NOWAIT) != 0) { NDFREE(&nd, NDF_ONLY_PNBUF); vput(nd.ni_dvp); diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index ae7f1484e83c..0d8372a39203 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -600,6 +600,7 @@ ffs_mountfs(devvp, mp, td) int32_t *lp; struct ucred *cred; struct g_consumer *cp; + struct mount *nmp; dev = devvp->v_rdev; cred = td ? td->td_ucred : NOCRED; @@ -749,9 +750,13 @@ ffs_mountfs(devvp, mp, td) mp->mnt_data = (qaddr_t)ump; mp->mnt_stat.f_fsid.val[0] = fs->fs_id[0]; mp->mnt_stat.f_fsid.val[1] = fs->fs_id[1]; + nmp = NULL; if (fs->fs_id[0] == 0 || fs->fs_id[1] == 0 || - vfs_getvfs(&mp->mnt_stat.f_fsid)) + (nmp = vfs_getvfs(&mp->mnt_stat.f_fsid))) { + if (nmp) + vfs_rel(nmp); vfs_getnewfsid(mp); + } mp->mnt_maxsymlinklen = fs->fs_maxsymlinklen; mp->mnt_flag |= MNT_LOCAL; if ((fs->fs_flags & FS_MULTILABEL) != 0) |