Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Clean up vnode lock operations pass 2:
details: https://anonhg.NetBSD.org/src/rev/e092d087f316
branches: trunk
changeset: 755832:e092d087f316
user: hannken <hannken%NetBSD.org@localhost>
date: Thu Jun 24 12:58:48 2010 +0000
description:
Clean up vnode lock operations pass 2:
VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument.
Welcome to 5.99.32.
Discussed on tech-kern.
diffstat:
external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c | 2 +-
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_replay.c | 20 +++---
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c | 4 +-
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c | 2 +-
external/cddl/osnet/dist/uts/common/fs/zfs/zvol.c | 2 +-
external/cddl/osnet/sys/kern/policy.c | 4 +-
external/cddl/osnet/sys/kern/vfs.c | 8 +-
external/cddl/osnet/sys/sys/vnode.h | 10 +-
lib/libp2k/p2k.c | 42 +++++++-------
lib/libukfs/ukfs.c | 6 +-
share/examples/rump/ttyserv/ttyserv.c | 10 +-
share/examples/rump/umserv/umserv.c | 10 +-
share/man/man9/vnodeops.9 | 11 +--
sys/arch/xen/xen/xbdback_xenbus.c | 6 +-
sys/coda/coda_vnops.c | 22 ++++----
sys/compat/common/vfs_syscalls_20.c | 6 +-
sys/compat/common/vfs_syscalls_30.c | 6 +-
sys/compat/common/vfs_syscalls_43.c | 6 +-
sys/compat/darwin/darwin_mman.c | 8 +-
sys/compat/ibcs2/ibcs2_misc.c | 8 +-
sys/compat/irix/irix_dirent.c | 8 +-
sys/compat/irix/irix_mman.c | 6 +-
sys/compat/irix/irix_usema.c | 6 +-
sys/compat/linux/common/linux_file64.c | 6 +-
sys/compat/linux/common/linux_misc.c | 6 +-
sys/compat/linux32/common/linux32_dirent.c | 6 +-
sys/compat/mach/mach_vm.c | 8 +-
sys/compat/osf1/osf1_exec_ecoff.c | 8 +-
sys/compat/osf1/osf1_file.c | 6 +-
sys/compat/pecoff/pecoff_exec.c | 8 +-
sys/compat/sunos/sunos_misc.c | 6 +-
sys/compat/sunos32/sunos32_misc.c | 6 +-
sys/compat/svr4/svr4_misc.c | 8 +-
sys/compat/svr4_32/svr4_32_misc.c | 8 +-
sys/dev/ata/ata_raid_subr.c | 6 +-
sys/dev/cons.c | 8 +-
sys/dev/dksubr.c | 8 +-
sys/dev/dkwedge/dk.c | 8 +-
sys/dev/firmload.c | 10 +-
sys/dev/fss.c | 12 ++--
sys/dev/kloader.c | 6 +-
sys/dev/vnd.c | 34 ++++++------
sys/fs/adosfs/adlookup.c | 6 +-
sys/fs/adosfs/advfsops.c | 8 +-
sys/fs/adosfs/advnops.c | 6 +-
sys/fs/cd9660/cd9660_lookup.c | 6 +-
sys/fs/cd9660/cd9660_node.c | 6 +-
sys/fs/cd9660/cd9660_vfsops.c | 8 +-
sys/fs/efs/efs_vfsops.c | 6 +-
sys/fs/efs/efs_vnops.c | 8 +-
sys/fs/filecorefs/filecore_lookup.c | 6 +-
sys/fs/filecorefs/filecore_node.c | 6 +-
sys/fs/filecorefs/filecore_vfsops.c | 8 +-
sys/fs/hfs/hfs_subr.c | 10 +-
sys/fs/hfs/hfs_vfsops.c | 6 +-
sys/fs/hfs/hfs_vnops.c | 6 +-
sys/fs/msdosfs/msdosfs_denode.c | 6 +-
sys/fs/msdosfs/msdosfs_lookup.c | 6 +-
sys/fs/msdosfs/msdosfs_vfsops.c | 10 +-
sys/fs/msdosfs/msdosfs_vnops.c | 30 +++++-----
sys/fs/nilfs/nilfs_vfsops.c | 6 +-
sys/fs/nilfs/nilfs_vnops.c | 18 +++---
sys/fs/ntfs/ntfs_vfsops.c | 10 +-
sys/fs/ntfs/ntfs_vnops.c | 8 +-
sys/fs/ptyfs/ptyfs_subr.c | 6 +-
sys/fs/ptyfs/ptyfs_vnops.c | 8 +-
sys/fs/puffs/puffs_vfsops.c | 6 +-
sys/fs/puffs/puffs_vnops.c | 10 +-
sys/fs/smbfs/smbfs_node.c | 6 +-
sys/fs/smbfs/smbfs_vfsops.c | 6 +-
sys/fs/smbfs/smbfs_vnops.c | 8 +-
sys/fs/sysvbfs/sysvbfs_vfsops.c | 6 +-
sys/fs/sysvbfs/sysvbfs_vnops.c | 6 +-
sys/fs/tmpfs/tmpfs_vnops.c | 12 ++--
sys/fs/udf/udf_vfsops.c | 8 +-
sys/fs/udf/udf_vnops.c | 20 +++---
sys/fs/union/union_subr.c | 30 +++++-----
sys/fs/union/union_vnops.c | 44 ++++++++--------
sys/fs/unionfs/unionfs_subr.c | 4 +-
sys/fs/unionfs/unionfs_vfsops.c | 8 +-
sys/fs/unionfs/unionfs_vnops.c | 40 +++++++-------
sys/kern/exec_elf.c | 8 +-
sys/kern/exec_macho.c | 8 +-
sys/kern/exec_script.c | 6 +-
sys/kern/exec_subr.c | 6 +-
sys/kern/kern_acct.c | 12 ++--
sys/kern/kern_core.c | 6 +-
sys/kern/kern_exec.c | 6 +-
sys/kern/kern_ktrace.c | 6 +-
sys/kern/kern_module_vfs.c | 6 +-
sys/kern/subr_exec_fd.c | 6 +-
sys/kern/subr_kobj_vfs.c | 6 +-
sys/kern/sys_aio.c | 6 +-
sys/kern/tty_ptm.c | 12 ++--
sys/kern/tty_tty.c | 10 +-
sys/kern/uipc_usrreq.c | 6 +-
sys/kern/vfs_cache.c | 6 +-
sys/kern/vfs_getcwd.c | 6 +-
sys/kern/vfs_lookup.c | 12 ++--
sys/kern/vfs_subr.c | 12 ++--
sys/kern/vfs_syscalls.c | 46 ++++++++--------
sys/kern/vfs_vnops.c | 22 ++++----
sys/kern/vfs_xattr.c | 14 ++--
sys/kern/vnode_if.c | 12 +--
sys/kern/vnode_if.src | 3 +-
sys/miscfs/fdesc/fdesc_vfsops.c | 6 +-
sys/miscfs/fdesc/fdesc_vnops.c | 12 ++--
sys/miscfs/fifofs/fifo_vnops.c | 14 ++--
sys/miscfs/genfs/genfs_vnops.c | 9 +--
sys/miscfs/genfs/layer_vnops.c | 6 +-
sys/miscfs/kernfs/kernfs_vnops.c | 6 +-
sys/miscfs/nullfs/null_vfsops.c | 6 +-
sys/miscfs/overlay/overlay_vfsops.c | 6 +-
sys/miscfs/procfs/procfs_vnops.c | 10 +-
sys/miscfs/specfs/spec_vnops.c | 16 ++--
sys/miscfs/syncfs/sync_vnops.c | 6 +-
sys/miscfs/umapfs/umap_vfsops.c | 6 +-
sys/nfs/nfs_node.c | 6 +-
sys/nfs/nfs_serv.c | 22 ++++----
sys/nfs/nfs_srvsubs.c | 6 +-
sys/nfs/nfs_vfsops.c | 6 +-
sys/nfs/nfs_vnops.c | 10 +-
sys/rump/include/rump/rumpvnode_if.h | 8 +-
sys/rump/librump/rumpvfs/rump_vfs.c | 6 +-
sys/rump/librump/rumpvfs/rumpfs.c | 8 +-
sys/rump/librump/rumpvfs/rumpvnode_if.c | 13 ++--
sys/sys/param.h | 4 +-
sys/sys/vnode_if.h | 9 +-
sys/ufs/ext2fs/ext2fs_inode.c | 6 +-
sys/ufs/ext2fs/ext2fs_lookup.c | 10 +-
sys/ufs/ext2fs/ext2fs_vfsops.c | 14 ++--
sys/ufs/ext2fs/ext2fs_vnops.c | 20 +++---
sys/ufs/ffs/ffs_snapshot.c | 8 +-
sys/ufs/ffs/ffs_vfsops.c | 16 ++--
sys/ufs/lfs/lfs_alloc.c | 10 +-
sys/ufs/lfs/lfs_bio.c | 8 +-
sys/ufs/lfs/lfs_segment.c | 6 +-
sys/ufs/lfs/lfs_syscalls.c | 8 +-
sys/ufs/lfs/lfs_vfsops.c | 12 ++--
sys/ufs/lfs/lfs_vnops.c | 12 ++--
sys/ufs/mfs/mfs_vnops.c | 6 +-
sys/ufs/ufs/ufs_extattr.c | 32 +++++-----
sys/ufs/ufs/ufs_inode.c | 6 +-
sys/ufs/ufs/ufs_lookup.c | 12 ++--
sys/ufs/ufs/ufs_quota.c | 10 +-
sys/ufs/ufs/ufs_vnops.c | 18 +++---
sys/ufs/ufs/ufs_wapbl.c | 12 ++--
sys/uvm/uvm_mmap.c | 6 +-
sys/uvm/uvm_swap.c | 6 +-
149 files changed, 734 insertions(+), 747 deletions(-)
diffs (truncated from 6522 to 300 lines):
diff -r 9d9ac848c24a -r e092d087f316 external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c Thu Jun 24 12:15:46 2010 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c Thu Jun 24 12:58:48 2010 +0000
@@ -61,7 +61,7 @@
cmd = 1;
error = VOP_IOCTL(vp, DIOCCACHESYNC, &cmd, FREAD|FWRITE,
kauth_cred_get());
- VOP_UNLOCK(vp, 0);
+ VOP_UNLOCK(vp);
bp->b_error = error;
vdev_disk_io_intr(bp);
}
diff -r 9d9ac848c24a -r e092d087f316 external/cddl/osnet/dist/uts/common/fs/zfs/zfs_replay.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_replay.c Thu Jun 24 12:15:46 2010 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_replay.c Thu Jun 24 12:58:48 2010 +0000
@@ -526,11 +526,11 @@
default:
error = ENOTSUP;
}
- VOP_UNLOCK(ZTOV(dzp), 0);
+ VOP_UNLOCK(ZTOV(dzp));
out:
if (error == 0 && vp != NULL) {
- VOP_UNLOCK(vp, 0);
+ VOP_UNLOCK(vp);
VN_RELE(vp);
}
@@ -569,7 +569,7 @@
vn_lock(ZTOV(dzp), LK_EXCLUSIVE | LK_RETRY);
error = VOP_LOOKUP(ZTOV(dzp), &vp, &cn);
if (error != 0) {
- VOP_UNLOCK(ZTOV(dzp), 0);
+ VOP_UNLOCK(ZTOV(dzp));
goto fail;
}
@@ -584,7 +584,7 @@
error = ENOTSUP;
}
vput(vp);
- VOP_UNLOCK(ZTOV(dzp), 0);
+ VOP_UNLOCK(ZTOV(dzp));
fail:
VN_RELE(ZTOV(dzp));
@@ -620,8 +620,8 @@
vn_lock(ZTOV(dzp), LK_EXCLUSIVE | LK_RETRY);
vn_lock(ZTOV(zp), LK_EXCLUSIVE | LK_RETRY);
error = VOP_LINK(ZTOV(dzp), ZTOV(zp), &cn /*,vflg*/);
- VOP_UNLOCK(ZTOV(zp), 0);
- VOP_UNLOCK(ZTOV(dzp), 0);
+ VOP_UNLOCK(ZTOV(zp));
+ VOP_UNLOCK(ZTOV(dzp));
VN_RELE(ZTOV(zp));
VN_RELE(ZTOV(dzp));
@@ -664,10 +664,10 @@
scn.cn_cred = kcred;
vn_lock(ZTOV(sdzp), LK_EXCLUSIVE | LK_RETRY);
error = VOP_LOOKUP(ZTOV(sdzp), &svp, &scn);
- VOP_UNLOCK(ZTOV(sdzp), 0);
+ VOP_UNLOCK(ZTOV(sdzp));
if (error != 0)
goto fail;
- VOP_UNLOCK(svp, 0);
+ VOP_UNLOCK(svp);
tcn.cn_nameptr = tname;
tcn.cn_namelen = strlen(tname);
@@ -680,7 +680,7 @@
if (error == EJUSTRETURN)
tvp = NULL;
else if (error != 0) {
- VOP_UNLOCK(ZTOV(tdzp), 0);
+ VOP_UNLOCK(ZTOV(tdzp));
goto fail;
}
@@ -857,7 +857,7 @@
vp = ZTOV(zp);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_SETATTR(vp, vap, kcred);
- VOP_UNLOCK(vp, 0);
+ VOP_UNLOCK(vp);
zfs_fuid_info_free(zfsvfs->z_fuid_replay);
zfsvfs->z_fuid_replay = NULL;
diff -r 9d9ac848c24a -r e092d087f316 external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Thu Jun 24 12:15:46 2010 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Thu Jun 24 12:58:48 2010 +0000
@@ -1347,7 +1347,7 @@
if (cnp->cn_flags & ISDOTDOT) {
ltype = VOP_ISLOCKED(dvp);
- VOP_UNLOCK(dvp, 0);
+ VOP_UNLOCK(dvp);
}
error = vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY);
if (cnp->cn_flags & ISDOTDOT)
@@ -5281,7 +5281,7 @@
* vrele() will call us again.
*/
*ap->a_recycle = (zp->z_unlinked != 0);
- VOP_UNLOCK(vp, 0);
+ VOP_UNLOCK(vp);
return (0);
}
diff -r 9d9ac848c24a -r e092d087f316 external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c Thu Jun 24 12:15:46 2010 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c Thu Jun 24 12:58:48 2010 +0000
@@ -997,7 +997,7 @@
vp = ZTOV(zp);
genfs_node_init(vp, &zfs_genfsops);
- VOP_UNLOCK(vp, 0);
+ VOP_UNLOCK(vp);
err = 0;
} else {
diff -r 9d9ac848c24a -r e092d087f316 external/cddl/osnet/dist/uts/common/fs/zfs/zvol.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/zvol.c Thu Jun 24 12:15:46 2010 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zvol.c Thu Jun 24 12:58:48 2010 +0000
@@ -521,7 +521,7 @@
struct stat sb;
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = vn_stat(vp, &sb);
- VOP_UNLOCK(vp, 0);
+ VOP_UNLOCK(vp);
if (error == 0) {
minor = getminor(sb.st_rdev);
}
diff -r 9d9ac848c24a -r e092d087f316 external/cddl/osnet/sys/kern/policy.c
--- a/external/cddl/osnet/sys/kern/policy.c Thu Jun 24 12:15:46 2010 +0000
+++ b/external/cddl/osnet/sys/kern/policy.c Thu Jun 24 12:58:48 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: policy.c,v 1.1 2009/08/07 20:57:57 haad Exp $ */
+/* $NetBSD: policy.c,v 1.2 2010/06/24 13:03:05 hannken Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -147,7 +147,7 @@
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_ACCESS(vp, mode, cred);
- VOP_UNLOCK(vp, 0);
+ VOP_UNLOCK(vp);
return error;
}
diff -r 9d9ac848c24a -r e092d087f316 external/cddl/osnet/sys/kern/vfs.c
--- a/external/cddl/osnet/sys/kern/vfs.c Thu Jun 24 12:15:46 2010 +0000
+++ b/external/cddl/osnet/sys/kern/vfs.c Thu Jun 24 12:58:48 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs.c,v 1.2 2009/10/11 10:54:52 haad Exp $ */
+/* $NetBSD: vfs.c,v 1.3 2010/06/24 13:03:05 hannken Exp $ */
/*-
* Copyright (c) 2006-2007 Pawel Jakub Dawidek <pjd%FreeBSD.org@localhost>
@@ -268,7 +268,7 @@
*/
vn_lock(vp, LK_SHARED | LK_RETRY);
mp = vfs_mount_alloc(vp, vfsp, fspath, td);
- VOP_UNLOCK(vp, 0);
+ VOP_UNLOCK(vp);
mp->mnt_optnew = NULL;
vfs_setmntopt(mp, "from", fspec, 0);
@@ -334,7 +334,7 @@
panic("mount: lost mount");
mountcheckdirs(vp, mvp);
vput(mvp);
- VOP_UNLOCK(vp, 0);
+ VOP_UNLOCK(vp);
if ((mp->mnt_flag & MNT_RDONLY) == 0)
error = vfs_allocate_syncvnode(mp);
vfs_unbusy(mp, td);
@@ -346,7 +346,7 @@
simple_lock(&vp->v_interlock);
vp->v_iflag &= ~VI_MOUNT;
simple_unlock(&vp->v_interlock);
- VOP_UNLOCK(vp, 0);
+ VOP_UNLOCK(vp);
vfs_unbusy(mp, td);
vfs_mount_destroy(mp);
}
diff -r 9d9ac848c24a -r e092d087f316 external/cddl/osnet/sys/sys/vnode.h
--- a/external/cddl/osnet/sys/sys/vnode.h Thu Jun 24 12:15:46 2010 +0000
+++ b/external/cddl/osnet/sys/sys/vnode.h Thu Jun 24 12:58:48 2010 +0000
@@ -1,5 +1,5 @@
-/* $NetBSD: vnode.h,v 1.4 2010/02/28 14:45:47 haad Exp $ */
+/* $NetBSD: vnode.h,v 1.5 2010/06/24 13:03:05 hannken Exp $ */
/*
* CDDL HEADER START
@@ -522,7 +522,7 @@
NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, pnamep);
error = vn_open(&nd, filemode, createmode);
if (error == 0) {
- VOP_UNLOCK(nd.ni_vp, 0);
+ VOP_UNLOCK(nd.ni_vp);
*vpp = nd.ni_vp;
}
return (error);
@@ -566,7 +566,7 @@
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_FSYNC(vp, cr, FSYNC_WAIT, 0, 0);
- VOP_UNLOCK(vp, 0);
+ VOP_UNLOCK(vp);
return (error);
}
#define VOP_FSYNC(vp, flag, cr, unk) zfs_vop_fsync((vp), (flag), (cr))
@@ -591,7 +591,7 @@
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_GETATTR(vp, ap, cr);
- VOP_UNLOCK(vp, 0);
+ VOP_UNLOCK(vp);
return (error);
}
#define VOP_GETATTR(vp, ap, flag, cr, unk) zfs_vop_getattr((vp), (ap), (flag), (cr))
@@ -603,7 +603,7 @@
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_SEEK(vp, off, *offp, kauth_cred_get());
- VOP_UNLOCK(vp, 0);
+ VOP_UNLOCK(vp);
return (error);
}
#define VOP_SEEK(vp, off, offp, unk) zfs_vop_seek(vp, off, offp)
diff -r 9d9ac848c24a -r e092d087f316 lib/libp2k/p2k.c
--- a/lib/libp2k/p2k.c Thu Jun 24 12:15:46 2010 +0000
+++ b/lib/libp2k/p2k.c Thu Jun 24 12:58:48 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: p2k.c,v 1.40 2010/06/07 11:23:07 pooka Exp $ */
+/* $NetBSD: p2k.c,v 1.41 2010/06/24 13:03:05 hannken Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Antti Kantee. All Rights Reserved.
@@ -624,7 +624,7 @@
rv = rump_pub_vfs_fhtovp(mp, fid, &vp);
if (rv)
return rv;
- RUMP_VOP_UNLOCK(vp, 0);
+ RUMP_VOP_UNLOCK(vp);
p2n = getp2n(p2m, vp, false, NULL);
if (p2n == NULL)
@@ -687,7 +687,7 @@
cn = makecn(pcn, 0);
RUMP_VOP_LOCK(dvp, LK_EXCLUSIVE);
rv = RUMP_VOP_LOOKUP(dvp, &vp, cn);
- RUMP_VOP_UNLOCK(dvp, 0);
+ RUMP_VOP_UNLOCK(dvp);
if (rump_pub_checksavecn(cn)) {
/*
* XXX the rename lookup protocol is currently horribly
@@ -732,7 +732,7 @@
}
return rv;
}
- RUMP_VOP_UNLOCK(vp, 0);
+ RUMP_VOP_UNLOCK(vp);
p2n = getp2n(p2m, vp, false, NULL);
if (p2n == NULL) {
@@ -826,7 +826,7 @@
freecn(cn, 0);
if (rv == 0) {
- RUMP_VOP_UNLOCK(vp, 0);
+ RUMP_VOP_UNLOCK(vp);
p2n = getp2n(p2m, vp, true, p2n);
puffs_newinfo_setcookie(pni, p2n);
} else {
@@ -871,7 +871,7 @@
cred = cred_create(pcr);
RUMP_VOP_LOCK(vp, LK_EXCLUSIVE);
rv = RUMP_VOP_OPEN(vp, mode, cred);
- RUMP_VOP_UNLOCK(vp, 0);
+ RUMP_VOP_UNLOCK(vp);
cred_destroy(cred);
return rv;
@@ -888,7 +888,7 @@
cred = cred_create(pcr);
RUMP_VOP_LOCK(vp, LK_EXCLUSIVE);
RUMP_VOP_CLOSE(vp, flags, cred);
- RUMP_VOP_UNLOCK(vp, 0);
+ RUMP_VOP_UNLOCK(vp);
cred_destroy(cred);
return 0;
@@ -906,7 +906,7 @@
cred = cred_create(pcr);
RUMP_VOP_LOCK(vp, LK_EXCLUSIVE);
Home |
Main Index |
Thread Index |
Old Index