Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Remove unused argument "nextp" from vfs_busy() and vfs_u...
details: https://anonhg.NetBSD.org/src/rev/b4525b2321f1
branches: trunk
changeset: 353005:b4525b2321f1
user: hannken <hannken%NetBSD.org@localhost>
date: Mon Apr 17 08:32:00 2017 +0000
description:
Remove unused argument "nextp" from vfs_busy() and vfs_unbusy().
Remove argument "keepref" from vfs_unbusy() and add vfs_ref() where needed.
diffstat:
sys/fs/cd9660/cd9660_vfsops.c | 8 ++++----
sys/fs/filecorefs/filecore_vfsops.c | 8 ++++----
sys/fs/msdosfs/msdosfs_vfsops.c | 10 +++++-----
sys/fs/ntfs/ntfs_vfsops.c | 8 ++++----
sys/fs/union/union_vnops.c | 8 ++++----
sys/fs/v7fs/v7fs_vfsops.c | 8 ++++----
sys/kern/vfs_lookup.c | 8 ++++----
sys/kern/vfs_mount.c | 31 +++++++++++++------------------
sys/kern/vfs_syscalls.c | 16 ++++++++--------
sys/kern/vfs_trans.c | 9 +++++----
sys/kern/vfs_vnode.c | 20 +++++++++++---------
sys/nfs/nfs_export.c | 12 ++++++------
sys/nfs/nfs_vfsops.c | 8 ++++----
sys/rump/librump/rumpvfs/rumpfs.c | 6 +++---
sys/sys/mount.h | 6 +++---
sys/ufs/ext2fs/ext2fs_vfsops.c | 8 ++++----
sys/ufs/ffs/ffs_vfsops.c | 8 ++++----
sys/ufs/lfs/lfs_bio.c | 8 ++++----
sys/ufs/lfs/lfs_syscalls.c | 18 +++++++++---------
sys/ufs/lfs/lfs_vfsops.c | 8 ++++----
sys/ufs/lfs/ulfs_vfsops.c | 12 ++++++------
sys/ufs/mfs/mfs_vfsops.c | 12 ++++++------
sys/ufs/ufs/ufs_vfsops.c | 12 ++++++------
23 files changed, 125 insertions(+), 127 deletions(-)
diffs (truncated from 1080 to 300 lines):
diff -r 9f1f740920c6 -r b4525b2321f1 sys/fs/cd9660/cd9660_vfsops.c
--- a/sys/fs/cd9660/cd9660_vfsops.c Mon Apr 17 08:31:01 2017 +0000
+++ b/sys/fs/cd9660/cd9660_vfsops.c Mon Apr 17 08:32:00 2017 +0000
@@ -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 @@
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);
}
diff -r 9f1f740920c6 -r b4525b2321f1 sys/fs/filecorefs/filecore_vfsops.c
--- a/sys/fs/filecorefs/filecore_vfsops.c Mon Apr 17 08:31:01 2017 +0000
+++ b/sys/fs/filecorefs/filecore_vfsops.c Mon Apr 17 08:32:00 2017 +0000
@@ -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 @@
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
diff -r 9f1f740920c6 -r b4525b2321f1 sys/fs/msdosfs/msdosfs_vfsops.c
--- a/sys/fs/msdosfs/msdosfs_vfsops.c Mon Apr 17 08:31:01 2017 +0000
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c Mon Apr 17 08:32:00 2017 +0000
@@ -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 @@
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 @@
mountlist_append(mp);
(void)msdosfs_statvfs(mp, &mp->mnt_stat);
- vfs_unbusy(mp, false, NULL);
+ vfs_unbusy(mp);
return (0);
}
diff -r 9f1f740920c6 -r b4525b2321f1 sys/fs/ntfs/ntfs_vfsops.c
--- a/sys/fs/ntfs/ntfs_vfsops.c Mon Apr 17 08:31:01 2017 +0000
+++ b/sys/fs/ntfs/ntfs_vfsops.c Mon Apr 17 08:32:00 2017 +0000
@@ -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 @@
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);
}
diff -r 9f1f740920c6 -r b4525b2321f1 sys/fs/union/union_vnops.c
--- a/sys/fs/union/union_vnops.c Mon Apr 17 08:31:01 2017 +0000
+++ b/sys/fs/union/union_vnops.c Mon Apr 17 08:32:00 2017 +0000
@@ -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 @@
*/
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);
}
diff -r 9f1f740920c6 -r b4525b2321f1 sys/fs/v7fs/v7fs_vfsops.c
--- a/sys/fs/v7fs/v7fs_vfsops.c Mon Apr 17 08:31:01 2017 +0000
+++ b/sys/fs/v7fs/v7fs_vfsops.c Mon Apr 17 08:32:00 2017 +0000
@@ -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 @@
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;
}
diff -r 9f1f740920c6 -r b4525b2321f1 sys/kern/vfs_lookup.c
--- a/sys/kern/vfs_lookup.c Mon Apr 17 08:31:01 2017 +0000
+++ b/sys/kern/vfs_lookup.c Mon Apr 17 08:32:00 2017 +0000
@@ -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 @@
KASSERT(searchdir != foundobj);
- error = vfs_busy(mp, NULL);
+ error = vfs_busy(mp);
if (error != 0) {
vput(foundobj);
goto done;
@@ -1097,7 +1097,7 @@
}
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);
diff -r 9f1f740920c6 -r b4525b2321f1 sys/kern/vfs_mount.c
--- a/sys/kern/vfs_mount.c Mon Apr 17 08:31:01 2017 +0000
+++ b/sys/kern/vfs_mount.c Mon Apr 17 08:32:00 2017 +0000
@@ -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 @@
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 @@
* => 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 @@
* => If nextp != NULL, acquire mountlist_lock.
*/
void
-vfs_unbusy(struct mount *mp, bool keepref, struct mount **nextp)
+vfs_unbusy(struct mount *mp)
{
Home |
Main Index |
Thread Index |
Old Index