Module Name: src
Committed By: hannken
Date: Mon Apr 17 08:32:02 UTC 2017
Modified Files:
src/sys/fs/cd9660: cd9660_vfsops.c
src/sys/fs/filecorefs: filecore_vfsops.c
src/sys/fs/msdosfs: msdosfs_vfsops.c
src/sys/fs/ntfs: ntfs_vfsops.c
src/sys/fs/union: union_vnops.c
src/sys/fs/v7fs: v7fs_vfsops.c
src/sys/kern: vfs_lookup.c vfs_mount.c vfs_syscalls.c vfs_trans.c
vfs_vnode.c
src/sys/nfs: nfs_export.c nfs_vfsops.c
src/sys/rump/librump/rumpvfs: rumpfs.c
src/sys/sys: mount.h
src/sys/ufs/ext2fs: ext2fs_vfsops.c
src/sys/ufs/ffs: ffs_vfsops.c
src/sys/ufs/lfs: lfs_bio.c lfs_syscalls.c lfs_vfsops.c ulfs_vfsops.c
src/sys/ufs/mfs: mfs_vfsops.c
src/sys/ufs/ufs: ufs_vfsops.c
Log Message:
Remove unused argument "nextp" from vfs_busy() and vfs_unbusy().
Remove argument "keepref" from vfs_unbusy() and add vfs_ref() where needed.
To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/fs/cd9660/cd9660_vfsops.c
cvs rdiff -u -r1.80 -r1.81 src/sys/fs/filecorefs/filecore_vfsops.c
cvs rdiff -u -r1.126 -r1.127 src/sys/fs/msdosfs/msdosfs_vfsops.c
cvs rdiff -u -r1.106 -r1.107 src/sys/fs/ntfs/ntfs_vfsops.c
cvs rdiff -u -r1.65 -r1.66 src/sys/fs/union/union_vnops.c
cvs rdiff -u -r1.14 -r1.15 src/sys/fs/v7fs/v7fs_vfsops.c
cvs rdiff -u -r1.205 -r1.206 src/sys/kern/vfs_lookup.c
cvs rdiff -u -r1.55 -r1.56 src/sys/kern/vfs_mount.c
cvs rdiff -u -r1.511 -r1.512 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.42 -r1.43 src/sys/kern/vfs_trans.c
cvs rdiff -u -r1.86 -r1.87 src/sys/kern/vfs_vnode.c
cvs rdiff -u -r1.59 -r1.60 src/sys/nfs/nfs_export.c
cvs rdiff -u -r1.234 -r1.235 src/sys/nfs/nfs_vfsops.c
cvs rdiff -u -r1.146 -r1.147 src/sys/rump/librump/rumpvfs/rumpfs.c
cvs rdiff -u -r1.224 -r1.225 src/sys/sys/mount.h
cvs rdiff -u -r1.207 -r1.208 src/sys/ufs/ext2fs/ext2fs_vfsops.c
cvs rdiff -u -r1.352 -r1.353 src/sys/ufs/ffs/ffs_vfsops.c
cvs rdiff -u -r1.138 -r1.139 src/sys/ufs/lfs/lfs_bio.c
cvs rdiff -u -r1.173 -r1.174 src/sys/ufs/lfs/lfs_syscalls.c
cvs rdiff -u -r1.358 -r1.359 src/sys/ufs/lfs/lfs_vfsops.c
cvs rdiff -u -r1.12 -r1.13 src/sys/ufs/lfs/ulfs_vfsops.c
cvs rdiff -u -r1.112 -r1.113 src/sys/ufs/mfs/mfs_vfsops.c
cvs rdiff -u -r1.54 -r1.55 src/sys/ufs/ufs/ufs_vfsops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/fs/cd9660/cd9660_vfsops.c
diff -u src/sys/fs/cd9660/cd9660_vfsops.c:1.92 src/sys/fs/cd9660/cd9660_vfsops.c:1.93
--- src/sys/fs/cd9660/cd9660_vfsops.c:1.92 Mon Apr 17 08:31:01 2017
+++ src/sys/fs/cd9660/cd9660_vfsops.c Mon Apr 17 08:32:00 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660_vfsops.c,v 1.92 2017/04/17 08:31:01 hannken Exp $ */
+/* $NetBSD: cd9660_vfsops.c,v 1.93 2017/04/17 08:32:00 hannken Exp $ */
/*-
* Copyright (c) 1994
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.92 2017/04/17 08:31:01 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.93 2017/04/17 08:32:00 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -191,13 +191,13 @@ cd9660_mountroot(void)
args.flags = ISOFSMNT_ROOT;
if ((error = iso_mountfs(rootvp, mp, l, &args)) != 0) {
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
vfs_rele(mp);
return (error);
}
mountlist_append(mp);
(void)cd9660_statvfs(mp, &mp->mnt_stat);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
return (0);
}
Index: src/sys/fs/filecorefs/filecore_vfsops.c
diff -u src/sys/fs/filecorefs/filecore_vfsops.c:1.80 src/sys/fs/filecorefs/filecore_vfsops.c:1.81
--- src/sys/fs/filecorefs/filecore_vfsops.c:1.80 Mon Apr 17 08:31:01 2017
+++ src/sys/fs/filecorefs/filecore_vfsops.c Mon Apr 17 08:32:00 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: filecore_vfsops.c,v 1.80 2017/04/17 08:31:01 hannken Exp $ */
+/* $NetBSD: filecore_vfsops.c,v 1.81 2017/04/17 08:32:00 hannken Exp $ */
/*-
* Copyright (c) 1994 The Regents of the University of California.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: filecore_vfsops.c,v 1.80 2017/04/17 08:31:01 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: filecore_vfsops.c,v 1.81 2017/04/17 08:32:00 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -201,13 +201,13 @@ filecore_mountroot(void)
args.flags = FILECOREMNT_ROOT;
if ((error = filecore_mountfs(rootvp, mp, p, &args)) != 0) {
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
vfs_rele(mp);
return (error);
}
mountlist_append(mp);
(void)filecore_statvfs(mp, &mp->mnt_stat, p);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
return (0);
}
#endif
Index: src/sys/fs/msdosfs/msdosfs_vfsops.c
diff -u src/sys/fs/msdosfs/msdosfs_vfsops.c:1.126 src/sys/fs/msdosfs/msdosfs_vfsops.c:1.127
--- src/sys/fs/msdosfs/msdosfs_vfsops.c:1.126 Mon Apr 17 08:31:01 2017
+++ src/sys/fs/msdosfs/msdosfs_vfsops.c Mon Apr 17 08:32:00 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: msdosfs_vfsops.c,v 1.126 2017/04/17 08:31:01 hannken Exp $ */
+/* $NetBSD: msdosfs_vfsops.c,v 1.127 2017/04/17 08:32:00 hannken Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.126 2017/04/17 08:31:01 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.127 2017/04/17 08:32:00 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -247,14 +247,14 @@ msdosfs_mountroot(void)
args.dirmask = 0777;
if ((error = msdosfs_mountfs(rootvp, mp, l, &args)) != 0) {
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
vfs_rele(mp);
return (error);
}
if ((error = update_mp(mp, &args)) != 0) {
(void)msdosfs_unmount(mp, 0);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
vfs_rele(mp);
vrele(rootvp);
return (error);
@@ -262,7 +262,7 @@ msdosfs_mountroot(void)
mountlist_append(mp);
(void)msdosfs_statvfs(mp, &mp->mnt_stat);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
return (0);
}
Index: src/sys/fs/ntfs/ntfs_vfsops.c
diff -u src/sys/fs/ntfs/ntfs_vfsops.c:1.106 src/sys/fs/ntfs/ntfs_vfsops.c:1.107
--- src/sys/fs/ntfs/ntfs_vfsops.c:1.106 Mon Apr 17 08:31:01 2017
+++ src/sys/fs/ntfs/ntfs_vfsops.c Mon Apr 17 08:32:00 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: ntfs_vfsops.c,v 1.106 2017/04/17 08:31:01 hannken Exp $ */
+/* $NetBSD: ntfs_vfsops.c,v 1.107 2017/04/17 08:32:00 hannken Exp $ */
/*-
* Copyright (c) 1998, 1999 Semen Ustimenko
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ntfs_vfsops.c,v 1.106 2017/04/17 08:31:01 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ntfs_vfsops.c,v 1.107 2017/04/17 08:32:00 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -115,14 +115,14 @@ ntfs_mountroot(void)
args.mode = 0777;
if ((error = ntfs_mountfs(rootvp, mp, &args, l)) != 0) {
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
vfs_rele(mp);
return (error);
}
mountlist_append(mp);
(void)ntfs_statvfs(mp, &mp->mnt_stat);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
return (0);
}
Index: src/sys/fs/union/union_vnops.c
diff -u src/sys/fs/union/union_vnops.c:1.65 src/sys/fs/union/union_vnops.c:1.66
--- src/sys/fs/union/union_vnops.c:1.65 Tue Apr 11 14:25:00 2017
+++ src/sys/fs/union/union_vnops.c Mon Apr 17 08:32:01 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: union_vnops.c,v 1.65 2017/04/11 14:25:00 riastradh Exp $ */
+/* $NetBSD: union_vnops.c,v 1.66 2017/04/17 08:32:01 hannken Exp $ */
/*
* Copyright (c) 1992, 1993, 1994, 1995
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: union_vnops.c,v 1.65 2017/04/11 14:25:00 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: union_vnops.c,v 1.66 2017/04/17 08:32:01 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -250,11 +250,11 @@ union_lookup1(struct vnode *udvp, struct
*/
while (dvp != udvp && (dvp->v_type == VDIR) &&
(mp = dvp->v_mountedhere)) {
- if (vfs_busy(mp, NULL))
+ if (vfs_busy(mp))
continue;
vput(dvp);
error = VFS_ROOT(mp, &tdvp);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
if (error) {
return (error);
}
Index: src/sys/fs/v7fs/v7fs_vfsops.c
diff -u src/sys/fs/v7fs/v7fs_vfsops.c:1.14 src/sys/fs/v7fs/v7fs_vfsops.c:1.15
--- src/sys/fs/v7fs/v7fs_vfsops.c:1.14 Mon Apr 17 08:31:02 2017
+++ src/sys/fs/v7fs/v7fs_vfsops.c Mon Apr 17 08:32:01 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: v7fs_vfsops.c,v 1.14 2017/04/17 08:31:02 hannken Exp $ */
+/* $NetBSD: v7fs_vfsops.c,v 1.15 2017/04/17 08:32:01 hannken Exp $ */
/*-
* Copyright (c) 2004, 2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: v7fs_vfsops.c,v 1.14 2017/04/17 08:31:02 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: v7fs_vfsops.c,v 1.15 2017/04/17 08:32:01 hannken Exp $");
#if defined _KERNEL_OPT
#include "opt_v7fs.h"
#endif
@@ -579,14 +579,14 @@ v7fs_mountroot(void)
if ((error = v7fs_mountfs(rootvp, mp, _BYTE_ORDER))) {
DPRINTF("mountfs error=%d\n", error);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
vfs_rele(mp);
return error;
}
mountlist_append(mp);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
return 0;
}
Index: src/sys/kern/vfs_lookup.c
diff -u src/sys/kern/vfs_lookup.c:1.205 src/sys/kern/vfs_lookup.c:1.206
--- src/sys/kern/vfs_lookup.c:1.205 Fri Apr 22 05:34:58 2016
+++ src/sys/kern/vfs_lookup.c Mon Apr 17 08:32:01 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_lookup.c,v 1.205 2016/04/22 05:34:58 riastradh Exp $ */
+/* $NetBSD: vfs_lookup.c,v 1.206 2017/04/17 08:32:01 hannken Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.205 2016/04/22 05:34:58 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.206 2017/04/17 08:32:01 hannken Exp $");
#ifdef _KERNEL_OPT
#include "opt_magiclinks.h"
@@ -1087,7 +1087,7 @@ unionlookup:
KASSERT(searchdir != foundobj);
- error = vfs_busy(mp, NULL);
+ error = vfs_busy(mp);
if (error != 0) {
vput(foundobj);
goto done;
@@ -1097,7 +1097,7 @@ unionlookup:
}
vput(foundobj);
error = VFS_ROOT(mp, &foundobj);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
if (error) {
if (searchdir != NULL) {
vn_lock(searchdir, LK_EXCLUSIVE | LK_RETRY);
Index: src/sys/kern/vfs_mount.c
diff -u src/sys/kern/vfs_mount.c:1.55 src/sys/kern/vfs_mount.c:1.56
--- src/sys/kern/vfs_mount.c:1.55 Mon Apr 17 08:31:02 2017
+++ src/sys/kern/vfs_mount.c Mon Apr 17 08:32:01 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_mount.c,v 1.55 2017/04/17 08:31:02 hannken Exp $ */
+/* $NetBSD: vfs_mount.c,v 1.56 2017/04/17 08:32:01 hannken Exp $ */
/*-
* Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.55 2017/04/17 08:31:02 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.56 2017/04/17 08:32:01 hannken Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -160,7 +160,7 @@ vfs_mountalloc(struct vfsops *vfsops, vn
mutex_init(&mp->mnt_unmounting, MUTEX_DEFAULT, IPL_NONE);
mutex_init(&mp->mnt_renamelock, MUTEX_DEFAULT, IPL_NONE);
mutex_init(&mp->mnt_updating, MUTEX_DEFAULT, IPL_NONE);
- error = vfs_busy(mp, NULL);
+ error = vfs_busy(mp);
KASSERT(error == 0);
mp->mnt_vnodecovered = vp;
mount_initspecific(mp);
@@ -312,13 +312,11 @@ vfs_rele(struct mount *mp)
* => Will fail if the file system is being unmounted, or is unmounted.
*/
int
-vfs_busy(struct mount *mp, struct mount **nextp)
+vfs_busy(struct mount *mp)
{
KASSERT(mp->mnt_refcnt > 0);
- KASSERT(nextp == NULL);
-
mutex_enter(&mp->mnt_unmounting);
if (__predict_false((mp->mnt_iflag & IMNT_GONE) != 0)) {
mutex_exit(&mp->mnt_unmounting);
@@ -340,20 +338,16 @@ vfs_busy(struct mount *mp, struct mount
* => If nextp != NULL, acquire mountlist_lock.
*/
void
-vfs_unbusy(struct mount *mp, bool keepref, struct mount **nextp)
+vfs_unbusy(struct mount *mp)
{
KASSERT(mp->mnt_refcnt > 0);
- KASSERT(nextp == NULL);
-
mutex_enter(&mp->mnt_unmounting);
KASSERT(mp->mnt_busynest != 0);
mp->mnt_busynest--;
mutex_exit(&mp->mnt_unmounting);
- if (!keepref) {
- vfs_rele(mp);
- }
+ vfs_rele(mp);
}
struct vnode_iterator {
@@ -727,7 +721,7 @@ mount_domount(struct lwp *l, vnode_t **v
}
if ((error = fstrans_mount(mp)) != 0) {
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
vfs_rele(mp);
return error;
}
@@ -794,7 +788,8 @@ mount_domount(struct lwp *l, vnode_t **v
mutex_exit(&mp->mnt_updating);
/* Hold an additional reference to the mount across VFS_START(). */
- vfs_unbusy(mp, true, NULL);
+ vfs_ref(mp);
+ vfs_unbusy(mp);
(void) VFS_STATVFS(mp, &mp->mnt_stat);
error = VFS_START(mp, 0);
if (error) {
@@ -815,7 +810,7 @@ err_unmounted:
vp->v_mountedhere = NULL;
mutex_exit(&mp->mnt_updating);
fstrans_unmount(mp);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
vfs_rele(mp);
return error;
@@ -1518,7 +1513,7 @@ mountlist_iterator_destroy(mount_iterato
struct mountlist_entry *marker = &mi->mi_entry;
if (marker->me_mount != NULL)
- vfs_unbusy(marker->me_mount, false, NULL);
+ vfs_unbusy(marker->me_mount);
mutex_enter(&mountlist_lock);
TAILQ_REMOVE(&mountlist, marker, me_list);
@@ -1539,7 +1534,7 @@ mountlist_iterator_next(mount_iterator_t
struct mount *mp;
if (marker->me_mount != NULL) {
- vfs_unbusy(marker->me_mount, false, NULL);
+ vfs_unbusy(marker->me_mount);
marker->me_mount = NULL;
}
@@ -1567,7 +1562,7 @@ mountlist_iterator_next(mount_iterator_t
mutex_exit(&mountlist_lock);
/* Try to mark this mount busy and return on success. */
- if (vfs_busy(mp, NULL) == 0) {
+ if (vfs_busy(mp) == 0) {
vfs_rele(mp);
marker->me_mount = mp;
return mp;
Index: src/sys/kern/vfs_syscalls.c
diff -u src/sys/kern/vfs_syscalls.c:1.511 src/sys/kern/vfs_syscalls.c:1.512
--- src/sys/kern/vfs_syscalls.c:1.511 Mon Apr 17 08:31:02 2017
+++ src/sys/kern/vfs_syscalls.c Mon Apr 17 08:32:01 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_syscalls.c,v 1.511 2017/04/17 08:31:02 hannken Exp $ */
+/* $NetBSD: vfs_syscalls.c,v 1.512 2017/04/17 08:32:01 hannken Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.511 2017/04/17 08:31:02 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.512 2017/04/17 08:32:01 hannken Exp $");
#ifdef _KERNEL_OPT
#include "opt_fileassoc.h"
@@ -282,7 +282,7 @@ mount_update(struct lwp *l, struct vnode
if (error)
goto out;
- if (vfs_busy(mp, NULL)) {
+ if (vfs_busy(mp)) {
error = EPERM;
goto out;
}
@@ -345,7 +345,7 @@ mount_update(struct lwp *l, struct vnode
}
mutex_exit(&mp->mnt_updating);
vfs_resume(mp);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
if ((error == 0) && !(saved_flags & MNT_EXTATTR) &&
(flags & MNT_EXTATTR)) {
@@ -438,7 +438,7 @@ mount_getargs(struct lwp *l, struct vnod
if ((vp->v_vflag & VV_ROOT) == 0)
return EINVAL;
- if (vfs_busy(mp, NULL))
+ if (vfs_busy(mp))
return EPERM;
mutex_enter(&mp->mnt_updating);
@@ -448,7 +448,7 @@ mount_getargs(struct lwp *l, struct vnod
mp->mnt_flag &= ~MNT_OP_FLAGS;
mutex_exit(&mp->mnt_updating);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
return (error);
}
@@ -1347,12 +1347,12 @@ sys_fchdir(struct lwp *l, const struct s
goto out;
}
while ((mp = vp->v_mountedhere) != NULL) {
- error = vfs_busy(mp, NULL);
+ error = vfs_busy(mp);
vput(vp);
if (error != 0)
goto out;
error = VFS_ROOT(mp, &tdp);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
if (error)
goto out;
vp = tdp;
Index: src/sys/kern/vfs_trans.c
diff -u src/sys/kern/vfs_trans.c:1.42 src/sys/kern/vfs_trans.c:1.43
--- src/sys/kern/vfs_trans.c:1.42 Mon Apr 17 08:31:02 2017
+++ src/sys/kern/vfs_trans.c Mon Apr 17 08:32:01 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_trans.c,v 1.42 2017/04/17 08:31:02 hannken Exp $ */
+/* $NetBSD: vfs_trans.c,v 1.43 2017/04/17 08:32:01 hannken Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_trans.c,v 1.42 2017/04/17 08:31:02 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_trans.c,v 1.43 2017/04/17 08:32:01 hannken Exp $");
/*
* File system transaction operations.
@@ -191,7 +191,7 @@ fstrans_mount(struct mount *mp)
int error;
struct fstrans_mount_info *newfmi;
- error = vfs_busy(mp, NULL);
+ error = vfs_busy(mp);
if (error)
return error;
newfmi = kmem_alloc(sizeof(*newfmi), KM_SLEEP);
@@ -205,7 +205,8 @@ fstrans_mount(struct mount *mp)
mp->mnt_iflag |= IMNT_HAS_TRANS;
mutex_exit(&fstrans_mount_lock);
- vfs_unbusy(mp, true, NULL);
+ vfs_ref(mp);
+ vfs_unbusy(mp);
return 0;
}
Index: src/sys/kern/vfs_vnode.c
diff -u src/sys/kern/vfs_vnode.c:1.86 src/sys/kern/vfs_vnode.c:1.87
--- src/sys/kern/vfs_vnode.c:1.86 Mon Apr 17 08:31:02 2017
+++ src/sys/kern/vfs_vnode.c Mon Apr 17 08:32:01 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_vnode.c,v 1.86 2017/04/17 08:31:02 hannken Exp $ */
+/* $NetBSD: vfs_vnode.c,v 1.87 2017/04/17 08:32:01 hannken Exp $ */
/*-
* Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -156,7 +156,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.86 2017/04/17 08:31:02 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.87 2017/04/17 08:32:01 hannken Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -1267,7 +1267,7 @@ again:
mutex_exit(&vcache_lock);
/* Allocate and initialize a new vcache / vnode pair. */
- error = vfs_busy(mp, NULL);
+ error = vfs_busy(mp);
if (error)
return error;
new_vip = vcache_alloc();
@@ -1284,7 +1284,7 @@ again:
/* If another thread beat us inserting this node, retry. */
if (vip != new_vip) {
vcache_dealloc(new_vip);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
goto again;
}
mutex_exit(&vcache_lock);
@@ -1296,7 +1296,7 @@ again:
SLIST_REMOVE(&vcache_hashtab[hash & vcache_hashmask],
new_vip, vnode_impl, vi_hash);
vcache_dealloc(new_vip);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
KASSERT(*vpp == NULL);
return error;
}
@@ -1306,7 +1306,8 @@ again:
vfs_insmntque(vp, mp);
if ((mp->mnt_iflag & IMNT_MPSAFE) != 0)
vp->v_vflag |= VV_MPSAFE;
- vfs_unbusy(mp, true, NULL);
+ vfs_ref(mp);
+ vfs_unbusy(mp);
/* Finished loading, finalize node. */
mutex_enter(&vcache_lock);
@@ -1334,7 +1335,7 @@ vcache_new(struct mount *mp, struct vnod
*vpp = NULL;
/* Allocate and initialize a new vcache / vnode pair. */
- error = vfs_busy(mp, NULL);
+ error = vfs_busy(mp);
if (error)
return error;
vip = vcache_alloc();
@@ -1347,7 +1348,7 @@ vcache_new(struct mount *mp, struct vnod
if (error) {
mutex_enter(&vcache_lock);
vcache_dealloc(vip);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
KASSERT(*vpp == NULL);
return error;
}
@@ -1371,7 +1372,8 @@ vcache_new(struct mount *mp, struct vnod
vfs_insmntque(vp, mp);
if ((mp->mnt_iflag & IMNT_MPSAFE) != 0)
vp->v_vflag |= VV_MPSAFE;
- vfs_unbusy(mp, true, NULL);
+ vfs_ref(mp);
+ vfs_unbusy(mp);
/* Finished loading, finalize node. */
mutex_enter(&vcache_lock);
Index: src/sys/nfs/nfs_export.c
diff -u src/sys/nfs/nfs_export.c:1.59 src/sys/nfs/nfs_export.c:1.60
--- src/sys/nfs/nfs_export.c:1.59 Sun Nov 20 09:28:43 2016
+++ src/sys/nfs/nfs_export.c Mon Apr 17 08:32:01 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_export.c,v 1.59 2016/11/20 09:28:43 maxv Exp $ */
+/* $NetBSD: nfs_export.c,v 1.60 2017/04/17 08:32:01 hannken Exp $ */
/*-
* Copyright (c) 1997, 1998, 2004, 2005, 2008 The NetBSD Foundation, Inc.
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_export.c,v 1.59 2016/11/20 09:28:43 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_export.c,v 1.60 2017/04/17 08:32:01 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -211,7 +211,7 @@ netexport_fini(void)
netexport_wrlock();
ne = TAILQ_FIRST(&netexport_list);
mp = ne->ne_mount;
- error = vfs_busy(mp, NULL);
+ error = vfs_busy(mp);
netexport_wrunlock();
if (error != 0) {
kpause("nfsfini", false, hz, NULL);
@@ -220,7 +220,7 @@ netexport_fini(void)
mutex_enter(&mp->mnt_updating); /* mnt_flag */
netexport_unmount(mp);
mutex_exit(&mp->mnt_updating); /* mnt_flag */
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
}
rw_destroy(&netexport_lock);
}
@@ -284,7 +284,7 @@ mountd_set_exports_list(const struct mou
}
/* Mark the file system busy. */
- error = vfs_busy(mp, NULL);
+ error = vfs_busy(mp);
vput(vp);
if (error != 0)
return error;
@@ -332,7 +332,7 @@ out:
netexport_wrunlock();
if (nmp == NULL)
mutex_exit(&mp->mnt_updating); /* mnt_flag */
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
return error;
}
Index: src/sys/nfs/nfs_vfsops.c
diff -u src/sys/nfs/nfs_vfsops.c:1.234 src/sys/nfs/nfs_vfsops.c:1.235
--- src/sys/nfs/nfs_vfsops.c:1.234 Mon Apr 17 08:31:02 2017
+++ src/sys/nfs/nfs_vfsops.c Mon Apr 17 08:32:01 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_vfsops.c,v 1.234 2017/04/17 08:31:02 hannken Exp $ */
+/* $NetBSD: nfs_vfsops.c,v 1.235 2017/04/17 08:32:01 hannken Exp $ */
/*
* Copyright (c) 1989, 1993, 1995
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_vfsops.c,v 1.234 2017/04/17 08:31:02 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_vfsops.c,v 1.235 2017/04/17 08:32:01 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_nfs.h"
@@ -380,7 +380,7 @@ nfs_mountroot(void)
mountlist_append(mp);
rootvp = vp;
mp->mnt_vnodecovered = NULLVP;
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
/* Get root attributes (for the time). */
vn_lock(vp, LK_SHARED | LK_RETRY);
@@ -435,7 +435,7 @@ nfs_mount_diskless(struct nfs_dlmount *n
error = mountnfs(&ndmntp->ndm_args, mp, m, mntname,
ndmntp->ndm_args.hostname, vpp, l);
if (error) {
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
vfs_rele(mp);
printf("nfs_mountroot: mount %s failed: %d\n",
mntname, error);
Index: src/sys/rump/librump/rumpvfs/rumpfs.c
diff -u src/sys/rump/librump/rumpvfs/rumpfs.c:1.146 src/sys/rump/librump/rumpvfs/rumpfs.c:1.147
--- src/sys/rump/librump/rumpvfs/rumpfs.c:1.146 Tue Apr 11 14:25:01 2017
+++ src/sys/rump/librump/rumpvfs/rumpfs.c Mon Apr 17 08:32:01 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpfs.c,v 1.146 2017/04/11 14:25:01 riastradh Exp $ */
+/* $NetBSD: rumpfs.c,v 1.147 2017/04/17 08:32:01 hannken Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.146 2017/04/11 14:25:01 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.147 2017/04/17 08:32:01 hannken Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -1975,7 +1975,7 @@ rumpfs_mountroot()
panic("set_statvfs_info failed for rootfs: %d", error);
mp->mnt_flag &= ~MNT_RDONLY;
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
return 0;
}
Index: src/sys/sys/mount.h
diff -u src/sys/sys/mount.h:1.224 src/sys/sys/mount.h:1.225
--- src/sys/sys/mount.h:1.224 Mon Apr 17 08:31:02 2017
+++ src/sys/sys/mount.h Mon Apr 17 08:32:01 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: mount.h,v 1.224 2017/04/17 08:31:02 hannken Exp $ */
+/* $NetBSD: mount.h,v 1.225 2017/04/17 08:32:01 hannken Exp $ */
/*
* Copyright (c) 1989, 1991, 1993
@@ -416,9 +416,9 @@ void vfs_sync_all(struct lwp *);
bool vfs_unmountall(struct lwp *); /* unmount file systems */
bool vfs_unmountall1(struct lwp *, bool, bool);
bool vfs_unmount_forceone(struct lwp *);
-int vfs_busy(struct mount *, struct mount **);
+int vfs_busy(struct mount *);
int vfs_rootmountalloc(const char *, const char *, struct mount **);
-void vfs_unbusy(struct mount *, bool, struct mount **);
+void vfs_unbusy(struct mount *);
int vfs_attach(struct vfsops *);
int vfs_detach(struct vfsops *);
void vfs_reinit(void);
Index: src/sys/ufs/ext2fs/ext2fs_vfsops.c
diff -u src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.207 src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.208
--- src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.207 Mon Apr 17 08:31:02 2017
+++ src/sys/ufs/ext2fs/ext2fs_vfsops.c Mon Apr 17 08:32:01 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: ext2fs_vfsops.c,v 1.207 2017/04/17 08:31:02 hannken Exp $ */
+/* $NetBSD: ext2fs_vfsops.c,v 1.208 2017/04/17 08:32:01 hannken Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1994
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.207 2017/04/17 08:31:02 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.208 2017/04/17 08:32:01 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -279,7 +279,7 @@ ext2fs_mountroot(void)
}
if ((error = ext2fs_mountfs(rootvp, mp)) != 0) {
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
vfs_rele(mp);
return error;
}
@@ -288,7 +288,7 @@ ext2fs_mountroot(void)
fs = ump->um_e2fs;
ext2fs_sb_setmountinfo(fs, mp);
(void)ext2fs_statvfs(mp, &mp->mnt_stat);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
setrootfstime((time_t)fs->e2fs.e2fs_wtime);
return 0;
}
Index: src/sys/ufs/ffs/ffs_vfsops.c
diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.352 src/sys/ufs/ffs/ffs_vfsops.c:1.353
--- src/sys/ufs/ffs/ffs_vfsops.c:1.352 Mon Apr 17 08:31:02 2017
+++ src/sys/ufs/ffs/ffs_vfsops.c Mon Apr 17 08:32:01 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_vfsops.c,v 1.352 2017/04/17 08:31:02 hannken Exp $ */
+/* $NetBSD: ffs_vfsops.c,v 1.353 2017/04/17 08:32:01 hannken Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.352 2017/04/17 08:31:02 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.353 2017/04/17 08:32:01 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -377,7 +377,7 @@ ffs_mountroot(void)
*/
mp->mnt_flag |= MNT_FORCE;
if ((error = ffs_mountfs(rootvp, mp, l)) != 0) {
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
vfs_rele(mp);
return (error);
}
@@ -388,7 +388,7 @@ ffs_mountroot(void)
memset(fs->fs_fsmnt, 0, sizeof(fs->fs_fsmnt));
(void)copystr(mp->mnt_stat.f_mntonname, fs->fs_fsmnt, MNAMELEN - 1, 0);
(void)ffs_statvfs(mp, &mp->mnt_stat);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
setrootfstime((time_t)fs->fs_time);
return (0);
}
Index: src/sys/ufs/lfs/lfs_bio.c
diff -u src/sys/ufs/lfs/lfs_bio.c:1.138 src/sys/ufs/lfs/lfs_bio.c:1.139
--- src/sys/ufs/lfs/lfs_bio.c:1.138 Thu Apr 13 09:57:28 2017
+++ src/sys/ufs/lfs/lfs_bio.c Mon Apr 17 08:32:01 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_bio.c,v 1.138 2017/04/13 09:57:28 hannken Exp $ */
+/* $NetBSD: lfs_bio.c,v 1.139 2017/04/17 08:32:01 hannken Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003, 2008 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_bio.c,v 1.138 2017/04/13 09:57:28 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_bio.c,v 1.139 2017/04/17 08:32:01 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -536,12 +536,12 @@ lfs_flush(struct lfs *fs, int flags, int
if (only_onefs) {
KASSERT(fs != NULL);
- if (vfs_busy(fs->lfs_ivnode->v_mount, NULL))
+ if (vfs_busy(fs->lfs_ivnode->v_mount))
goto errout;
mutex_enter(&lfs_lock);
lfs_flush_fs(fs, flags);
mutex_exit(&lfs_lock);
- vfs_unbusy(fs->lfs_ivnode->v_mount, false, NULL);
+ vfs_unbusy(fs->lfs_ivnode->v_mount);
} else {
locked_fakequeue_count = 0;
mountlist_iterator_init(&iter);
Index: src/sys/ufs/lfs/lfs_syscalls.c
diff -u src/sys/ufs/lfs/lfs_syscalls.c:1.173 src/sys/ufs/lfs/lfs_syscalls.c:1.174
--- src/sys/ufs/lfs/lfs_syscalls.c:1.173 Mon Mar 13 14:24:20 2017
+++ src/sys/ufs/lfs/lfs_syscalls.c Mon Apr 17 08:32:01 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_syscalls.c,v 1.173 2017/03/13 14:24:20 riastradh Exp $ */
+/* $NetBSD: lfs_syscalls.c,v 1.174 2017/04/17 08:32:01 hannken Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007, 2007, 2008
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_syscalls.c,v 1.173 2017/03/13 14:24:20 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_syscalls.c,v 1.174 2017/04/17 08:32:01 hannken Exp $");
#ifndef LFS
# define LFS /* for prototypes in syscallargs.h */
@@ -253,7 +253,7 @@ lfs_markv(struct lwp *l, fsid_t *fsidp,
cnt = blkcnt;
- if ((error = vfs_busy(mntp, NULL)) != 0)
+ if ((error = vfs_busy(mntp)) != 0)
return (error);
/*
@@ -479,7 +479,7 @@ lfs_markv(struct lwp *l, fsid_t *fsidp,
lfs_segunlock(fs);
- vfs_unbusy(mntp, false, NULL);
+ vfs_unbusy(mntp);
if (error)
return (error);
else if (do_again)
@@ -508,7 +508,7 @@ err3:
}
lfs_segunlock(fs);
- vfs_unbusy(mntp, false, NULL);
+ vfs_unbusy(mntp);
KASSERTMSG((numrefed == 0), "lfs_markv: numrefed=%d", numrefed);
return (error);
@@ -651,7 +651,7 @@ lfs_bmapv(struct lwp *l, fsid_t *fsidp,
if ((mntp = vfs_getvfs(fsidp)) == NULL)
return (ENOENT);
- if ((error = vfs_busy(mntp, NULL)) != 0)
+ if ((error = vfs_busy(mntp)) != 0)
return (error);
ump = VFSTOULFS(mntp);
@@ -765,7 +765,7 @@ lfs_bmapv(struct lwp *l, fsid_t *fsidp,
KASSERTMSG((numrefed == 0), "lfs_bmapv: numrefed=%d", numrefed);
- vfs_unbusy(mntp, false, NULL);
+ vfs_unbusy(mntp);
return 0;
}
@@ -804,7 +804,7 @@ sys_lfs_segclean(struct lwp *l, const st
fs = VFSTOULFS(mntp)->um_lfs;
segnum = SCARG(uap, segment);
- if ((error = vfs_busy(mntp, NULL)) != 0)
+ if ((error = vfs_busy(mntp)) != 0)
return (error);
KERNEL_LOCK(1, NULL);
@@ -812,7 +812,7 @@ sys_lfs_segclean(struct lwp *l, const st
error = lfs_do_segclean(fs, segnum);
lfs_segunlock(fs);
KERNEL_UNLOCK_ONE(NULL);
- vfs_unbusy(mntp, false, NULL);
+ vfs_unbusy(mntp);
return error;
}
Index: src/sys/ufs/lfs/lfs_vfsops.c
diff -u src/sys/ufs/lfs/lfs_vfsops.c:1.358 src/sys/ufs/lfs/lfs_vfsops.c:1.359
--- src/sys/ufs/lfs/lfs_vfsops.c:1.358 Mon Apr 17 08:31:02 2017
+++ src/sys/ufs/lfs/lfs_vfsops.c Mon Apr 17 08:32:01 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_vfsops.c,v 1.358 2017/04/17 08:31:02 hannken Exp $ */
+/* $NetBSD: lfs_vfsops.c,v 1.359 2017/04/17 08:32:01 hannken Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007, 2007
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.358 2017/04/17 08:31:02 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.359 2017/04/17 08:32:01 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_lfs.h"
@@ -595,7 +595,7 @@ lfs_mountroot(void)
return (error);
}
if ((error = lfs_mountfs(rootvp, mp, l))) {
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
vfs_rele(mp);
return (error);
}
@@ -604,7 +604,7 @@ lfs_mountroot(void)
fs = ump->um_lfs;
lfs_sb_setfsmnt(fs, mp->mnt_stat.f_mntonname);
(void)lfs_statvfs(mp, &mp->mnt_stat);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
setrootfstime((time_t)lfs_sb_gettstamp(VFSTOULFS(mp)->um_lfs));
return (0);
}
Index: src/sys/ufs/lfs/ulfs_vfsops.c
diff -u src/sys/ufs/lfs/ulfs_vfsops.c:1.12 src/sys/ufs/lfs/ulfs_vfsops.c:1.13
--- src/sys/ufs/lfs/ulfs_vfsops.c:1.12 Mon Jun 20 02:25:03 2016
+++ src/sys/ufs/lfs/ulfs_vfsops.c Mon Apr 17 08:32:01 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: ulfs_vfsops.c,v 1.12 2016/06/20 02:25:03 dholland Exp $ */
+/* $NetBSD: ulfs_vfsops.c,v 1.13 2017/04/17 08:32:01 hannken Exp $ */
/* from NetBSD: ufs_vfsops.c,v 1.54 2015/03/17 09:39:29 hannken Exp */
/*
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ulfs_vfsops.c,v 1.12 2016/06/20 02:25:03 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ulfs_vfsops.c,v 1.13 2017/04/17 08:32:01 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_lfs.h"
@@ -113,7 +113,7 @@ ulfs_quotactl(struct mount *mp, struct q
int error;
/* Mark the mount busy, as we're passing it to kauth(9). */
- error = vfs_busy(mp, NULL);
+ error = vfs_busy(mp);
if (error) {
return (error);
}
@@ -122,7 +122,7 @@ ulfs_quotactl(struct mount *mp, struct q
error = lfsquota_handle_cmd(mp, l, args);
mutex_exit(&mp->mnt_updating);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
return (error);
#endif
}
@@ -169,7 +169,7 @@ ulfs_quotactl(struct mount *mp, struct q
}
if (error) {
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
return (error);
}
@@ -204,7 +204,7 @@ ulfs_quotactl(struct mount *mp, struct q
error = EINVAL;
}
mutex_exit(&mp->mnt_updating);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
return (error);
#endif
Index: src/sys/ufs/mfs/mfs_vfsops.c
diff -u src/sys/ufs/mfs/mfs_vfsops.c:1.112 src/sys/ufs/mfs/mfs_vfsops.c:1.113
--- src/sys/ufs/mfs/mfs_vfsops.c:1.112 Mon Apr 17 08:31:02 2017
+++ src/sys/ufs/mfs/mfs_vfsops.c Mon Apr 17 08:32:02 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: mfs_vfsops.c,v 1.112 2017/04/17 08:31:02 hannken Exp $ */
+/* $NetBSD: mfs_vfsops.c,v 1.113 2017/04/17 08:32:02 hannken Exp $ */
/*
* Copyright (c) 1989, 1990, 1993, 1994
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mfs_vfsops.c,v 1.112 2017/04/17 08:31:02 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfs_vfsops.c,v 1.113 2017/04/17 08:32:02 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -215,7 +215,7 @@ mfs_mountroot(void)
mfsp->mfs_refcnt = 1;
bufq_alloc(&mfsp->mfs_buflist, "fcfs", 0);
if ((error = ffs_mountfs(rootvp, mp, l)) != 0) {
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
bufq_free(mfsp->mfs_buflist);
vfs_rele(mp);
kmem_free(mfsp, sizeof(*mfsp));
@@ -227,7 +227,7 @@ mfs_mountroot(void)
fs = ump->um_fs;
(void) copystr(mp->mnt_stat.f_mntonname, fs->fs_fsmnt, MNAMELEN - 1, 0);
(void)ffs_statvfs(mp, &mp->mnt_stat);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
return (0);
}
@@ -375,14 +375,14 @@ mfs_start(struct mount *mp, int flags)
* Add a reference to the mfsnode to prevent it disappearing in
* this routine.
*/
- if ((error = vfs_busy(mp, NULL)) != 0)
+ if ((error = vfs_busy(mp)) != 0)
return error;
vp = VFSTOUFS(mp)->um_devvp;
mfsp = VTOMFS(vp);
mutex_enter(&mfs_lock);
mfsp->mfs_refcnt++;
mutex_exit(&mfs_lock);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
base = mfsp->mfs_baseoff;
mutex_enter(&mfs_lock);
Index: src/sys/ufs/ufs/ufs_vfsops.c
diff -u src/sys/ufs/ufs/ufs_vfsops.c:1.54 src/sys/ufs/ufs/ufs_vfsops.c:1.55
--- src/sys/ufs/ufs/ufs_vfsops.c:1.54 Tue Mar 17 09:39:29 2015
+++ src/sys/ufs/ufs/ufs_vfsops.c Mon Apr 17 08:32:02 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_vfsops.c,v 1.54 2015/03/17 09:39:29 hannken Exp $ */
+/* $NetBSD: ufs_vfsops.c,v 1.55 2017/04/17 08:32:02 hannken Exp $ */
/*
* Copyright (c) 1991, 1993, 1994
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_vfsops.c,v 1.54 2015/03/17 09:39:29 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_vfsops.c,v 1.55 2017/04/17 08:32:02 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -132,7 +132,7 @@ ufs_quotactl(struct mount *mp, struct qu
int error;
/* Mark the mount busy, as we're passing it to kauth(9). */
- error = vfs_busy(mp, NULL);
+ error = vfs_busy(mp);
if (error) {
return (error);
}
@@ -141,7 +141,7 @@ ufs_quotactl(struct mount *mp, struct qu
error = quota_handle_cmd(mp, l, args);
mutex_exit(&mp->mnt_updating);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
return (error);
#endif
}
@@ -188,7 +188,7 @@ ufs_quotactl(struct mount *mp, struct qu
}
if (error) {
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
return (error);
}
@@ -223,7 +223,7 @@ ufs_quotactl(struct mount *mp, struct qu
error = EINVAL;
}
mutex_exit(&mp->mnt_updating);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
return (error);
#endif