From 0245fd506fc80555f0b186a67e1b874d9e3a77cf Mon Sep 17 00:00:00 2001 From: Visa Hankala Date: Wed, 26 Sep 2018 14:51:45 +0000 Subject: Move the allocating and freeing of mount points into dedicated functions. OK deraadt@ mpi@ --- sys/ufs/ffs/ffs_vfsops.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sys/ufs/ffs/ffs_vfsops.c') diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 6c52beaa6f8..41532f35faf 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_vfsops.c,v 1.178 2018/07/11 17:44:57 kn Exp $ */ +/* $OpenBSD: ffs_vfsops.c,v 1.179 2018/09/26 14:51:44 visa Exp $ */ /* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */ /* @@ -177,9 +177,8 @@ ffs_mountroot(void) } if ((error = ffs_mountfs(rootvp, mp, p)) != 0) { - mp->mnt_vfc->vfc_refcount--; vfs_unbusy(mp); - free(mp, M_MOUNT, sizeof(*mp)); + vfs_mount_free(mp); vrele(swapdev_vp); vrele(rootvp); return (error); -- cgit v1.2.3