summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c8
-rw-r--r--sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c6
-rw-r--r--sys/cddl/compat/opensolaris/sys/vnode.h7
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c4
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c20
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c2
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c2
-rw-r--r--sys/compat/linux/linux_file.c2
-rw-r--r--sys/compat/linux/linux_misc.c4
-rw-r--r--sys/compat/ndis/subr_ndis.c2
-rw-r--r--sys/compat/opensolaris/kern/opensolaris_kobj.c8
-rw-r--r--sys/compat/opensolaris/kern/opensolaris_vfs.c6
-rw-r--r--sys/compat/opensolaris/sys/vnode.h7
-rw-r--r--sys/compat/pecoff/imgact_pecoff.c5
-rw-r--r--sys/compat/svr4/imgact_svr4.c3
-rw-r--r--sys/compat/svr4/svr4_fcntl.c2
-rw-r--r--sys/compat/svr4/svr4_misc.c6
-rw-r--r--sys/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c4
-rw-r--r--sys/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c20
-rw-r--r--sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c2
-rw-r--r--sys/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c2
-rw-r--r--sys/dev/hwpmc/hwpmc_mod.c6
-rw-r--r--sys/dev/md/md.c16
-rw-r--r--sys/fs/cd9660/cd9660_lookup.c3
-rw-r--r--sys/fs/cd9660/cd9660_vfsops.c4
-rw-r--r--sys/fs/coda/coda_vnops.c8
-rw-r--r--sys/fs/devfs/devfs_devs.c4
-rw-r--r--sys/fs/devfs/devfs_vfsops.c2
-rw-r--r--sys/fs/devfs/devfs_vnops.c8
-rw-r--r--sys/fs/fdescfs/fdesc_vnops.c2
-rw-r--r--sys/fs/fifofs/fifo_vnops.c4
-rw-r--r--sys/fs/hpfs/hpfs_vfsops.c2
-rw-r--r--sys/fs/hpfs/hpfs_vnops.c2
-rw-r--r--sys/fs/msdosfs/msdosfs_lookup.c3
-rw-r--r--sys/fs/msdosfs/msdosfs_vfsops.c10
-rw-r--r--sys/fs/msdosfs/msdosfs_vnops.c35
-rw-r--r--sys/fs/ntfs/ntfs_vfsops.c2
-rw-r--r--sys/fs/ntfs/ntfs_vnops.c2
-rw-r--r--sys/fs/nullfs/null_vfsops.c6
-rw-r--r--sys/fs/nullfs/null_vnops.c10
-rw-r--r--sys/fs/nwfs/nwfs_vfsops.c2
-rw-r--r--sys/fs/nwfs/nwfs_vnops.c2
-rw-r--r--sys/fs/procfs/procfs.c2
-rw-r--r--sys/fs/pseudofs/pseudofs_vncache.c4
-rw-r--r--sys/fs/pseudofs/pseudofs_vnops.c2
-rw-r--r--sys/fs/smbfs/smbfs_vfsops.c2
-rw-r--r--sys/fs/smbfs/smbfs_vnops.c2
-rw-r--r--sys/fs/tmpfs/tmpfs_vfsops.c2
-rw-r--r--sys/fs/tmpfs/tmpfs_vnops.c4
-rw-r--r--sys/fs/udf/udf_vfsops.c2
-rw-r--r--sys/fs/udf/udf_vnops.c2
-rw-r--r--sys/fs/unionfs/union_subr.c8
-rw-r--r--sys/fs/unionfs/union_vfsops.c8
-rw-r--r--sys/fs/unionfs/union_vnops.c74
-rw-r--r--sys/gnu/fs/ext2fs/ext2_lookup.c3
-rw-r--r--sys/gnu/fs/ext2fs/ext2_vfsops.c16
-rw-r--r--sys/gnu/fs/ext2fs/ext2_vnops.c17
-rw-r--r--sys/gnu/fs/ext2fs/fs.h2
-rw-r--r--sys/gnu/fs/reiserfs/reiserfs_inode.c2
-rw-r--r--sys/gnu/fs/reiserfs/reiserfs_namei.c2
-rw-r--r--sys/gnu/fs/reiserfs/reiserfs_vfsops.c6
-rw-r--r--sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c2
-rw-r--r--sys/gnu/fs/xfs/FreeBSD/xfs_super.c4
-rw-r--r--sys/gnu/fs/xfs/FreeBSD/xfs_vnode.c2
-rw-r--r--sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c10
-rw-r--r--sys/i386/ibcs2/ibcs2_misc.c4
-rw-r--r--sys/i386/ibcs2/imgact_coff.c7
-rw-r--r--sys/i386/linux/imgact_linux.c3
-rw-r--r--sys/kern/imgact_aout.c2
-rw-r--r--sys/kern/imgact_elf.c5
-rw-r--r--sys/kern/imgact_gzip.c3
-rw-r--r--sys/kern/kern_acct.c4
-rw-r--r--sys/kern/kern_alq.c4
-rw-r--r--sys/kern/kern_descrip.c2
-rw-r--r--sys/kern/kern_exec.c6
-rw-r--r--sys/kern/kern_exit.c2
-rw-r--r--sys/kern/kern_jail.c6
-rw-r--r--sys/kern/kern_ktrace.c4
-rw-r--r--sys/kern/kern_linker.c6
-rw-r--r--sys/kern/kern_sig.c6
-rw-r--r--sys/kern/link_elf.c2
-rw-r--r--sys/kern/link_elf_obj.c2
-rw-r--r--sys/kern/tty_cons.c2
-rw-r--r--sys/kern/uipc_mqueue.c2
-rw-r--r--sys/kern/uipc_syscalls.c4
-rw-r--r--sys/kern/uipc_usrreq.c2
-rw-r--r--sys/kern/vfs_acl.c6
-rw-r--r--sys/kern/vfs_aio.c2
-rw-r--r--sys/kern/vfs_bio.c3
-rw-r--r--sys/kern/vfs_cache.c2
-rw-r--r--sys/kern/vfs_default.c9
-rw-r--r--sys/kern/vfs_extattr.c8
-rw-r--r--sys/kern/vfs_lookup.c23
-rw-r--r--sys/kern/vfs_mount.c20
-rw-r--r--sys/kern/vfs_subr.c39
-rw-r--r--sys/kern/vfs_syscalls.c54
-rw-r--r--sys/kern/vfs_vnops.c25
-rw-r--r--sys/kern/vnode_if.src2
-rw-r--r--sys/nfs4client/nfs4_vfsops.c2
-rw-r--r--sys/nfs4client/nfs4_vnops.c4
-rw-r--r--sys/nfsclient/nfs_subs.c2
-rw-r--r--sys/nfsclient/nfs_vfsops.c4
-rw-r--r--sys/nfsclient/nfs_vnops.c4
-rw-r--r--sys/nfsserver/nfs_serv.c32
-rw-r--r--sys/nfsserver/nfs_srvsubs.c9
-rw-r--r--sys/security/audit/audit_arg.c4
-rw-r--r--sys/security/audit/audit_syscalls.c4
-rw-r--r--sys/security/audit/audit_worker.c14
-rw-r--r--sys/security/mac/mac_process.c4
-rw-r--r--sys/security/mac/mac_syscalls.c4
-rw-r--r--sys/sys/vnode.h2
-rw-r--r--sys/ufs/ffs/ffs_rawread.c14
-rw-r--r--sys/ufs/ffs/ffs_snapshot.c28
-rw-r--r--sys/ufs/ffs/ffs_softdep.c4
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c16
-rw-r--r--sys/ufs/ffs/ffs_vnops.c6
-rw-r--r--sys/ufs/ufs/ufs_extattr.c32
-rw-r--r--sys/ufs/ufs/ufs_lookup.c7
-rw-r--r--sys/ufs/ufs/ufs_quota.c12
-rw-r--r--sys/ufs/ufs/ufs_vnops.c12
-rw-r--r--sys/vm/swap_pager.c6
-rw-r--r--sys/vm/vm_contig.c2
-rw-r--r--sys/vm/vm_object.c2
-rw-r--r--sys/vm/vnode_pager.c2
124 files changed, 453 insertions, 483 deletions
diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c b/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c
index 6014c2e..efb2885 100644
--- a/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c
+++ b/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c
@@ -77,12 +77,12 @@ kobj_open_file_vnode(const char *file)
flags = FREAD;
NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, file, td);
- error = vn_open_cred(&nd, &flags, 0, td->td_ucred, NULL);
+ error = vn_open_cred(&nd, &flags, 0, curthread->td_ucred, NULL);
NDFREE(&nd, NDF_ONLY_PNBUF);
if (error != 0)
return (NULL);
/* We just unlock so we hold a reference. */
- VOP_UNLOCK(nd.ni_vp, 0, td);
+ VOP_UNLOCK(nd.ni_vp, 0);
return (nd.ni_vp);
}
@@ -125,7 +125,7 @@ kobj_get_filesize_vnode(struct _buf *file, uint64_t *size)
vn_lock(vp, LK_SHARED | LK_RETRY);
error = VOP_GETATTR(vp, &va, td->td_ucred, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if (error == 0)
*size = (uint64_t)va.va_size;
return (error);
@@ -178,7 +178,7 @@ kobj_read_file_vnode(struct _buf *file, char *buf, unsigned size, unsigned off)
vn_lock(vp, LK_SHARED | LK_RETRY);
error = VOP_READ(vp, &auio, IO_UNIT | IO_SYNC, td->td_ucred);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
return (error != 0 ? -1 : size - auio.uio_resid);
}
diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c b/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c
index 93eba51..166eeed 100644
--- a/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c
+++ b/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c
@@ -194,7 +194,7 @@ domount(kthread_t *td, vnode_t *vp, const char *fstype, char *fspath,
*/
vn_lock(vp, LK_SHARED | LK_RETRY);
mp = vfs_mount_alloc(vp, vfsp, fspath, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
mp->mnt_optnew = NULL;
vfs_setmntopt(mp, "from", fspec, 0);
@@ -260,7 +260,7 @@ domount(kthread_t *td, vnode_t *vp, const char *fstype, char *fspath,
panic("mount: lost mount");
mountcheckdirs(vp, mvp);
vput(mvp);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if ((mp->mnt_flag & MNT_RDONLY) == 0)
error = vfs_allocate_syncvnode(mp);
vfs_unbusy(mp, td);
@@ -272,7 +272,7 @@ domount(kthread_t *td, vnode_t *vp, const char *fstype, char *fspath,
VI_LOCK(vp);
vp->v_iflag &= ~VI_MOUNT;
VI_UNLOCK(vp);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vfs_unbusy(mp, td);
vfs_mount_destroy(mp);
}
diff --git a/sys/cddl/compat/opensolaris/sys/vnode.h b/sys/cddl/compat/opensolaris/sys/vnode.h
index 171b7fe..a8a261c 100644
--- a/sys/cddl/compat/opensolaris/sys/vnode.h
+++ b/sys/cddl/compat/opensolaris/sys/vnode.h
@@ -175,7 +175,7 @@ zfs_vn_open(char *pnamep, enum uio_seg seg, int filemode, int createmode,
if (error == 0) {
/* We just unlock so we hold a reference. */
VN_HOLD(nd.ni_vp);
- VOP_UNLOCK(nd.ni_vp, 0, td);
+ VOP_UNLOCK(nd.ni_vp, 0);
*vpp = nd.ni_vp;
}
return (error);
@@ -213,7 +213,6 @@ zfs_vn_rdwr(enum uio_rw rw, vnode_t *vp, caddr_t base, ssize_t len,
static __inline int
zfs_vop_fsync(vnode_t *vp, int flag, cred_t *cr)
{
- struct thread *td = curthread;
struct mount *mp;
int error, vfslocked;
@@ -223,8 +222,8 @@ zfs_vop_fsync(vnode_t *vp, int flag, cred_t *cr)
if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0)
goto drop;
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
- error = VOP_FSYNC(vp, MNT_WAIT, td);
- VOP_UNLOCK(vp, 0, td);
+ error = VOP_FSYNC(vp, MNT_WAIT, curthread);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
drop:
VFS_UNLOCK_GIANT(vfslocked);
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
index c0e9993..0c2fb02 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
@@ -391,7 +391,7 @@ zfsctl_root_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, pathname_t *pnp,
if (strcmp(nm, "..") == 0) {
err = VFS_ROOT(dvp->v_vfsp, LK_EXCLUSIVE, vpp, curthread);
if (err == 0)
- VOP_UNLOCK(*vpp, 0, curthread);
+ VOP_UNLOCK(*vpp, 0);
} else {
err = gfs_dir_lookup(dvp, nm, vpp);
}
@@ -882,7 +882,7 @@ zfsctl_snapshot_inactive(ap)
VERIFY(gfs_dir_lookup(vp, "..", &dvp) == 0);
sdp = dvp->v_data;
- VOP_UNLOCK(dvp, 0, ap->a_td);
+ VOP_UNLOCK(dvp, 0);
if (!(locked = MUTEX_HELD(&sdp->sd_lock)))
mutex_enter(&sdp->sd_lock);
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c
index adf838c..2be3093 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c
@@ -127,10 +127,10 @@ zfs_replay_create(zfsvfs_t *zfsvfs, lr_create_t *lr, boolean_t byteswap)
default:
error = ENOTSUP;
}
- VOP_UNLOCK(ZTOV(dzp), 0, curthread);
+ VOP_UNLOCK(ZTOV(dzp), 0);
if (error == 0 && vp != NULL) {
- VOP_UNLOCK(vp, 0, curthread);
+ VOP_UNLOCK(vp, 0);
VN_RELE(vp);
}
@@ -165,7 +165,7 @@ zfs_replay_remove(zfsvfs_t *zfsvfs, lr_remove_t *lr, boolean_t byteswap)
vn_lock(ZTOV(dzp), LK_EXCLUSIVE | LK_RETRY);
error = VOP_LOOKUP(ZTOV(dzp), &vp, &cn);
if (error != 0) {
- VOP_UNLOCK(ZTOV(dzp), 0, curthread);
+ VOP_UNLOCK(ZTOV(dzp), 0);
goto fail;
}
@@ -180,7 +180,7 @@ zfs_replay_remove(zfsvfs_t *zfsvfs, lr_remove_t *lr, boolean_t byteswap)
error = ENOTSUP;
}
vput(vp);
- VOP_UNLOCK(ZTOV(dzp), 0, curthread);
+ VOP_UNLOCK(ZTOV(dzp), 0);
fail:
VN_RELE(ZTOV(dzp));
@@ -214,8 +214,8 @@ zfs_replay_link(zfsvfs_t *zfsvfs, lr_link_t *lr, boolean_t byteswap)
vn_lock(ZTOV(dzp), LK_EXCLUSIVE | LK_RETRY);
vn_lock(ZTOV(zp), LK_EXCLUSIVE | LK_RETRY);
error = VOP_LINK(ZTOV(dzp), ZTOV(zp), &cn);
- VOP_UNLOCK(ZTOV(zp), 0, curthread);
- VOP_UNLOCK(ZTOV(dzp), 0, curthread);
+ VOP_UNLOCK(ZTOV(zp), 0);
+ VOP_UNLOCK(ZTOV(dzp), 0);
VN_RELE(ZTOV(zp));
VN_RELE(ZTOV(dzp));
@@ -257,10 +257,10 @@ zfs_replay_rename(zfsvfs_t *zfsvfs, lr_rename_t *lr, boolean_t byteswap)
scn.cn_thread = td;
vn_lock(ZTOV(sdzp), LK_EXCLUSIVE | LK_RETRY);
error = VOP_LOOKUP(ZTOV(sdzp), &svp, &scn);
- VOP_UNLOCK(ZTOV(sdzp), 0, td);
+ VOP_UNLOCK(ZTOV(sdzp), 0);
if (error != 0)
goto fail;
- VOP_UNLOCK(svp, 0, td);
+ VOP_UNLOCK(svp, 0);
bzero(&tcn, sizeof(tcn));
tcn.cn_nameptr = tname;
@@ -275,7 +275,7 @@ zfs_replay_rename(zfsvfs_t *zfsvfs, lr_rename_t *lr, boolean_t byteswap)
if (error == EJUSTRETURN)
tvp = NULL;
else if (error != 0) {
- VOP_UNLOCK(ZTOV(tdzp), 0, td);
+ VOP_UNLOCK(ZTOV(tdzp), 0);
goto fail;
}
@@ -362,7 +362,7 @@ zfs_replay_setattr(zfsvfs_t *zfsvfs, lr_setattr_t *lr, boolean_t byteswap)
vp = ZTOV(zp);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_SETATTR(vp, &va, kcred, curthread);
- VOP_UNLOCK(vp, 0, curthread);
+ VOP_UNLOCK(vp, 0);
VN_RELE(vp);
return (error);
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
index 631b13f..8ba0461 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
@@ -1114,7 +1114,7 @@ zfs_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, struct componentname *cnp,
if (cnp->cn_flags & ISDOTDOT) {
ltype = VOP_ISLOCKED(dvp, td);
- VOP_UNLOCK(dvp, 0, td);
+ VOP_UNLOCK(dvp, 0);
}
error = vn_lock(*vpp, cnp->cn_lkflags);
if (cnp->cn_flags & ISDOTDOT)
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
index 6774c8b..a201837 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
@@ -87,7 +87,7 @@ znode_pageout_func(dmu_buf_t *dbuf, void *user_ptr)
mutex_exit(&zp->z_lock);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
vrecycle(vp, curthread);
- VOP_UNLOCK(vp, 0, curthread);
+ VOP_UNLOCK(vp, 0);
vdrop(vp);
zfs_znode_free(zp);
} else {
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index 66192a3..2a12a67 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -598,7 +598,7 @@ out:
if (cookies)
free(cookies, M_TEMP);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
fdrop(fp, td);
free(buf, M_TEMP);
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 96adc6d..1adb656 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -377,7 +377,7 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args)
* Lock no longer needed
*/
locked = 0;
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
/*
@@ -458,7 +458,7 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args)
cleanup:
/* Unlock vnode if needed */
if (locked) {
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
}
diff --git a/sys/compat/ndis/subr_ndis.c b/sys/compat/ndis/subr_ndis.c
index e4269b5..8c90d82 100644
--- a/sys/compat/ndis/subr_ndis.c
+++ b/sys/compat/ndis/subr_ndis.c
@@ -2970,7 +2970,7 @@ NdisOpenFile(status, filehandle, filelength, filename, highestaddr)
/* Get the file size. */
VOP_GETATTR(nd.ni_vp, vap, td->td_ucred, td);
- VOP_UNLOCK(nd.ni_vp, 0, td);
+ VOP_UNLOCK(nd.ni_vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
fh->nf_vp = nd.ni_vp;
diff --git a/sys/compat/opensolaris/kern/opensolaris_kobj.c b/sys/compat/opensolaris/kern/opensolaris_kobj.c
index 6014c2e..efb2885 100644
--- a/sys/compat/opensolaris/kern/opensolaris_kobj.c
+++ b/sys/compat/opensolaris/kern/opensolaris_kobj.c
@@ -77,12 +77,12 @@ kobj_open_file_vnode(const char *file)
flags = FREAD;
NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, file, td);
- error = vn_open_cred(&nd, &flags, 0, td->td_ucred, NULL);
+ error = vn_open_cred(&nd, &flags, 0, curthread->td_ucred, NULL);
NDFREE(&nd, NDF_ONLY_PNBUF);
if (error != 0)
return (NULL);
/* We just unlock so we hold a reference. */
- VOP_UNLOCK(nd.ni_vp, 0, td);
+ VOP_UNLOCK(nd.ni_vp, 0);
return (nd.ni_vp);
}
@@ -125,7 +125,7 @@ kobj_get_filesize_vnode(struct _buf *file, uint64_t *size)
vn_lock(vp, LK_SHARED | LK_RETRY);
error = VOP_GETATTR(vp, &va, td->td_ucred, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if (error == 0)
*size = (uint64_t)va.va_size;
return (error);
@@ -178,7 +178,7 @@ kobj_read_file_vnode(struct _buf *file, char *buf, unsigned size, unsigned off)
vn_lock(vp, LK_SHARED | LK_RETRY);
error = VOP_READ(vp, &auio, IO_UNIT | IO_SYNC, td->td_ucred);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
return (error != 0 ? -1 : size - auio.uio_resid);
}
diff --git a/sys/compat/opensolaris/kern/opensolaris_vfs.c b/sys/compat/opensolaris/kern/opensolaris_vfs.c
index 93eba51..166eeed 100644
--- a/sys/compat/opensolaris/kern/opensolaris_vfs.c
+++ b/sys/compat/opensolaris/kern/opensolaris_vfs.c
@@ -194,7 +194,7 @@ domount(kthread_t *td, vnode_t *vp, const char *fstype, char *fspath,
*/
vn_lock(vp, LK_SHARED | LK_RETRY);
mp = vfs_mount_alloc(vp, vfsp, fspath, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
mp->mnt_optnew = NULL;
vfs_setmntopt(mp, "from", fspec, 0);
@@ -260,7 +260,7 @@ domount(kthread_t *td, vnode_t *vp, const char *fstype, char *fspath,
panic("mount: lost mount");
mountcheckdirs(vp, mvp);
vput(mvp);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if ((mp->mnt_flag & MNT_RDONLY) == 0)
error = vfs_allocate_syncvnode(mp);
vfs_unbusy(mp, td);
@@ -272,7 +272,7 @@ domount(kthread_t *td, vnode_t *vp, const char *fstype, char *fspath,
VI_LOCK(vp);
vp->v_iflag &= ~VI_MOUNT;
VI_UNLOCK(vp);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vfs_unbusy(mp, td);
vfs_mount_destroy(mp);
}
diff --git a/sys/compat/opensolaris/sys/vnode.h b/sys/compat/opensolaris/sys/vnode.h
index 171b7fe..a8a261c 100644
--- a/sys/compat/opensolaris/sys/vnode.h
+++ b/sys/compat/opensolaris/sys/vnode.h
@@ -175,7 +175,7 @@ zfs_vn_open(char *pnamep, enum uio_seg seg, int filemode, int createmode,
if (error == 0) {
/* We just unlock so we hold a reference. */
VN_HOLD(nd.ni_vp);
- VOP_UNLOCK(nd.ni_vp, 0, td);
+ VOP_UNLOCK(nd.ni_vp, 0);
*vpp = nd.ni_vp;
}
return (error);
@@ -213,7 +213,6 @@ zfs_vn_rdwr(enum uio_rw rw, vnode_t *vp, caddr_t base, ssize_t len,
static __inline int
zfs_vop_fsync(vnode_t *vp, int flag, cred_t *cr)
{
- struct thread *td = curthread;
struct mount *mp;
int error, vfslocked;
@@ -223,8 +222,8 @@ zfs_vop_fsync(vnode_t *vp, int flag, cred_t *cr)
if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0)
goto drop;
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
- error = VOP_FSYNC(vp, MNT_WAIT, td);
- VOP_UNLOCK(vp, 0, td);
+ error = VOP_FSYNC(vp, MNT_WAIT, curthread);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
drop:
VFS_UNLOCK_GIANT(vfslocked);
diff --git a/sys/compat/pecoff/imgact_pecoff.c b/sys/compat/pecoff/imgact_pecoff.c
index 54ee1b2..cd2fab3 100644
--- a/sys/compat/pecoff/imgact_pecoff.c
+++ b/sys/compat/pecoff/imgact_pecoff.c
@@ -316,7 +316,7 @@ pecoff_load_file(struct thread * td, const char *file, u_long * addr, u_long * e
* Check permissions, modes, uid, etc on the file, and "open" it.
*/
error = exec_check_permissions(imgp);
- VOP_UNLOCK(nd.ni_vp, 0, td);
+ VOP_UNLOCK(nd.ni_vp, 0);
if (error)
goto fail;
if ((error = pecoff_read_from(td, imgp->vp, 0, (caddr_t) & dh, sizeof(dh))) != 0)
@@ -579,14 +579,13 @@ imgact_pecoff(struct image_params * imgp)
imgp->image_header;
struct coff_filehdr *fp;
int error, peofs;
- struct thread *td = curthread;
error = pecoff_signature(FIRST_THREAD_IN_PROC(imgp->proc),
imgp->vp, dp);
if (error) {
return -1;
}
- VOP_UNLOCK(imgp->vp, 0, td);
+ VOP_UNLOCK(imgp->vp, 0);
peofs = dp->d_peofs + sizeof(signature) - 1;
fp = malloc(PECOFF_HDR_SIZE, M_TEMP, M_WAITOK);
diff --git a/sys/compat/svr4/imgact_svr4.c b/sys/compat/svr4/imgact_svr4.c
index d755368..5d80f10 100644
--- a/sys/compat/svr4/imgact_svr4.c
+++ b/sys/compat/svr4/imgact_svr4.c
@@ -68,7 +68,6 @@ exec_svr4_imgact(imgp)
vm_offset_t buffer;
unsigned long bss_size;
int error;
- struct thread *td = curthread;
if (((a_out->a_magic >> 16) & 0xff) != 0x64)
return -1;
@@ -115,7 +114,7 @@ exec_svr4_imgact(imgp)
}
PROC_UNLOCK(imgp->proc);
- VOP_UNLOCK(imgp->vp, 0, td);
+ VOP_UNLOCK(imgp->vp, 0);
/*
* Destroy old process VM and create a new one (with a new stack)
diff --git a/sys/compat/svr4/svr4_fcntl.c b/sys/compat/svr4/svr4_fcntl.c
index ff52bb1..40ae830 100644
--- a/sys/compat/svr4/svr4_fcntl.c
+++ b/sys/compat/svr4/svr4_fcntl.c
@@ -272,7 +272,7 @@ fd_revoke(td, fd)
#ifdef MAC
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = mac_vnode_check_revoke(td->td_ucred, vp);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if (error)
goto out;
#endif
diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c
index cc07c25..9d9011c 100644
--- a/sys/compat/svr4/svr4_misc.c
+++ b/sys/compat/svr4/svr4_misc.c
@@ -396,7 +396,7 @@ again:
eof:
td->td_retval[0] = nbytes - resid;
out:
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
fdrop(fp, td);
if (cookies)
@@ -529,7 +529,7 @@ again:
eof:
*retval = uap->nbytes - resid;
out:
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
fdrop(fp, td);
if (cookiebuf)
@@ -629,7 +629,7 @@ svr4_sys_fchroot(td, uap)
if (error)
goto fail;
#endif
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
error = change_root(vp, td);
vrele(vp);
VFS_UNLOCK_GIANT(vfslocked);
diff --git a/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c b/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
index c0e9993..0c2fb02 100644
--- a/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
+++ b/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
@@ -391,7 +391,7 @@ zfsctl_root_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, pathname_t *pnp,
if (strcmp(nm, "..") == 0) {
err = VFS_ROOT(dvp->v_vfsp, LK_EXCLUSIVE, vpp, curthread);
if (err == 0)
- VOP_UNLOCK(*vpp, 0, curthread);
+ VOP_UNLOCK(*vpp, 0);
} else {
err = gfs_dir_lookup(dvp, nm, vpp);
}
@@ -882,7 +882,7 @@ zfsctl_snapshot_inactive(ap)
VERIFY(gfs_dir_lookup(vp, "..", &dvp) == 0);
sdp = dvp->v_data;
- VOP_UNLOCK(dvp, 0, ap->a_td);
+ VOP_UNLOCK(dvp, 0);
if (!(locked = MUTEX_HELD(&sdp->sd_lock)))
mutex_enter(&sdp->sd_lock);
diff --git a/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c b/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c
index adf838c..2be3093 100644
--- a/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c
+++ b/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c
@@ -127,10 +127,10 @@ zfs_replay_create(zfsvfs_t *zfsvfs, lr_create_t *lr, boolean_t byteswap)
default:
error = ENOTSUP;
}
- VOP_UNLOCK(ZTOV(dzp), 0, curthread);
+ VOP_UNLOCK(ZTOV(dzp), 0);
if (error == 0 && vp != NULL) {
- VOP_UNLOCK(vp, 0, curthread);
+ VOP_UNLOCK(vp, 0);
VN_RELE(vp);
}
@@ -165,7 +165,7 @@ zfs_replay_remove(zfsvfs_t *zfsvfs, lr_remove_t *lr, boolean_t byteswap)
vn_lock(ZTOV(dzp), LK_EXCLUSIVE | LK_RETRY);
error = VOP_LOOKUP(ZTOV(dzp), &vp, &cn);
if (error != 0) {
- VOP_UNLOCK(ZTOV(dzp), 0, curthread);
+ VOP_UNLOCK(ZTOV(dzp), 0);
goto fail;
}
@@ -180,7 +180,7 @@ zfs_replay_remove(zfsvfs_t *zfsvfs, lr_remove_t *lr, boolean_t byteswap)
error = ENOTSUP;
}
vput(vp);
- VOP_UNLOCK(ZTOV(dzp), 0, curthread);
+ VOP_UNLOCK(ZTOV(dzp), 0);
fail:
VN_RELE(ZTOV(dzp));
@@ -214,8 +214,8 @@ zfs_replay_link(zfsvfs_t *zfsvfs, lr_link_t *lr, boolean_t byteswap)
vn_lock(ZTOV(dzp), LK_EXCLUSIVE | LK_RETRY);
vn_lock(ZTOV(zp), LK_EXCLUSIVE | LK_RETRY);
error = VOP_LINK(ZTOV(dzp), ZTOV(zp), &cn);
- VOP_UNLOCK(ZTOV(zp), 0, curthread);
- VOP_UNLOCK(ZTOV(dzp), 0, curthread);
+ VOP_UNLOCK(ZTOV(zp), 0);
+ VOP_UNLOCK(ZTOV(dzp), 0);
VN_RELE(ZTOV(zp));
VN_RELE(ZTOV(dzp));
@@ -257,10 +257,10 @@ zfs_replay_rename(zfsvfs_t *zfsvfs, lr_rename_t *lr, boolean_t byteswap)
scn.cn_thread = td;
vn_lock(ZTOV(sdzp), LK_EXCLUSIVE | LK_RETRY);
error = VOP_LOOKUP(ZTOV(sdzp), &svp, &scn);
- VOP_UNLOCK(ZTOV(sdzp), 0, td);
+ VOP_UNLOCK(ZTOV(sdzp), 0);
if (error != 0)
goto fail;
- VOP_UNLOCK(svp, 0, td);
+ VOP_UNLOCK(svp, 0);
bzero(&tcn, sizeof(tcn));
tcn.cn_nameptr = tname;
@@ -275,7 +275,7 @@ zfs_replay_rename(zfsvfs_t *zfsvfs, lr_rename_t *lr, boolean_t byteswap)
if (error == EJUSTRETURN)
tvp = NULL;
else if (error != 0) {
- VOP_UNLOCK(ZTOV(tdzp), 0, td);
+ VOP_UNLOCK(ZTOV(tdzp), 0);
goto fail;
}
@@ -362,7 +362,7 @@ zfs_replay_setattr(zfsvfs_t *zfsvfs, lr_setattr_t *lr, boolean_t byteswap)
vp = ZTOV(zp);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_SETATTR(vp, &va, kcred, curthread);
- VOP_UNLOCK(vp, 0, curthread);
+ VOP_UNLOCK(vp, 0);
VN_RELE(vp);
return (error);
diff --git a/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
index 631b13f..8ba0461 100644
--- a/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
+++ b/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
@@ -1114,7 +1114,7 @@ zfs_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, struct componentname *cnp,
if (cnp->cn_flags & ISDOTDOT) {
ltype = VOP_ISLOCKED(dvp, td);
- VOP_UNLOCK(dvp, 0, td);
+ VOP_UNLOCK(dvp, 0);
}
error = vn_lock(*vpp, cnp->cn_lkflags);
if (cnp->cn_flags & ISDOTDOT)
diff --git a/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c b/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
index 6774c8b..a201837 100644
--- a/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
+++ b/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
@@ -87,7 +87,7 @@ znode_pageout_func(dmu_buf_t *dbuf, void *user_ptr)
mutex_exit(&zp->z_lock);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
vrecycle(vp, curthread);
- VOP_UNLOCK(vp, 0, curthread);
+ VOP_UNLOCK(vp, 0);
vdrop(vp);
zfs_znode_free(zp);
} else {
diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c
index 391a42c..b98ecbf 100644
--- a/sys/dev/hwpmc/hwpmc_mod.c
+++ b/sys/dev/hwpmc/hwpmc_mod.c
@@ -678,14 +678,12 @@ pmc_force_context_switch(void)
static void
pmc_getfilename(struct vnode *v, char **fullpath, char **freepath)
{
- struct thread *td;
- td = curthread;
*fullpath = "unknown";
*freepath = NULL;
vn_lock(v, LK_CANRECURSE | LK_EXCLUSIVE | LK_RETRY);
- vn_fullpath(td, v, fullpath, freepath);
- VOP_UNLOCK(v, 0, td);
+ vn_fullpath(curthread, v, fullpath, freepath);
+ VOP_UNLOCK(v, 0);
}
/*
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 994b1f6..8e91c6f 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -532,7 +532,7 @@ mdstart_vnode(struct md_s *sc, struct bio *bp)
(void) vn_start_write(vp, &mp, V_WAIT);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_FSYNC(vp, MNT_WAIT, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
VFS_UNLOCK_GIANT(vfslocked);
return (error);
@@ -562,13 +562,13 @@ mdstart_vnode(struct md_s *sc, struct bio *bp)
if (bp->bio_cmd == BIO_READ) {
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_READ(vp, &auio, IO_DIRECT, sc->cred);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
} else {
(void) vn_start_write(vp, &mp, V_WAIT);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_WRITE(vp, &auio, sc->flags & MD_ASYNC ? 0 : IO_SYNC,
sc->cred);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
}
VFS_UNLOCK_GIANT(vfslocked);
@@ -897,7 +897,7 @@ mdsetcred(struct md_s *sc, struct ucred *cred)
auio.uio_resid = aiov.iov_len;
vn_lock(sc->vnode, LK_EXCLUSIVE | LK_RETRY);
error = VOP_READ(sc->vnode, &auio, 0, sc->cred);
- VOP_UNLOCK(sc->vnode, 0, curthread);
+ VOP_UNLOCK(sc->vnode, 0);
free(tmpbuf, M_TEMP);
}
return (error);
@@ -928,13 +928,13 @@ mdcreate_vnode(struct md_s *sc, struct md_ioctl *mdio, struct thread *td)
NDFREE(&nd, NDF_ONLY_PNBUF);
if (nd.ni_vp->v_type != VREG ||
(error = VOP_GETATTR(nd.ni_vp, &vattr, td->td_ucred, td))) {
- VOP_UNLOCK(nd.ni_vp, 0, td);
+ VOP_UNLOCK(nd.ni_vp, 0);
(void)vn_close(nd.ni_vp, flags, td->td_ucred, td);
VFS_UNLOCK_GIANT(vfslocked);
return (error ? error : EINVAL);
}
nd.ni_vp->v_vflag |= VV_MD;
- VOP_UNLOCK(nd.ni_vp, 0, td);
+ VOP_UNLOCK(nd.ni_vp, 0);
if (mdio->md_fwsectors != 0)
sc->fwsectors = mdio->md_fwsectors;
@@ -949,7 +949,7 @@ mdcreate_vnode(struct md_s *sc, struct md_ioctl *mdio, struct thread *td)
if (error != 0) {
vn_lock(nd.ni_vp, LK_EXCLUSIVE | LK_RETRY);
nd.ni_vp->v_vflag &= ~VV_MD;
- VOP_UNLOCK(nd.ni_vp, 0, td);
+ VOP_UNLOCK(nd.ni_vp, 0);
(void)vn_close(nd.ni_vp, flags, td->td_ucred, td);
VFS_UNLOCK_GIANT(vfslocked);
return (error);
@@ -986,7 +986,7 @@ mddestroy(struct md_s *sc, struct thread *td)
vfslocked = VFS_LOCK_GIANT(sc->vnode->v_mount);
vn_lock(sc->vnode, LK_EXCLUSIVE | LK_RETRY);
sc->vnode->v_vflag &= ~VV_MD;
- VOP_UNLOCK(sc->vnode, 0, td);
+ VOP_UNLOCK(sc->vnode, 0);
(void)vn_close(sc->vnode, sc->flags & MD_READONLY ?
FREAD : (FREAD|FWRITE), sc->cred, td);
VFS_UNLOCK_GIANT(vfslocked);
diff --git a/sys/fs/cd9660/cd9660_lookup.c b/sys/fs/cd9660/cd9660_lookup.c
index ddaf8dd..9d87352 100644
--- a/sys/fs/cd9660/cd9660_lookup.c
+++ b/sys/fs/cd9660/cd9660_lookup.c
@@ -115,7 +115,6 @@ cd9660_lookup(ap)
struct componentname *cnp = ap->a_cnp;
int flags = cnp->cn_flags;
int nameiop = cnp->cn_nameiop;
- struct thread *td = cnp->cn_thread;
bp = NULL;
*vpp = NULL;
@@ -349,7 +348,7 @@ found:
*/
if (flags & ISDOTDOT) {
saved_ino = dp->i_ino;
- VOP_UNLOCK(pdp, 0, td); /* race to get the inode */
+ VOP_UNLOCK(pdp, 0); /* race to get the inode */
error = cd9660_vget_internal(vdp->v_mount, saved_ino,
LK_EXCLUSIVE, &tdp,
saved_ino != ino, ep);
diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c
index a63f3d6..f4a370f 100644
--- a/sys/fs/cd9660/cd9660_vfsops.c
+++ b/sys/fs/cd9660/cd9660_vfsops.c
@@ -178,7 +178,7 @@ cd9660_mount(struct mount *mp, struct thread *td)
vput(devvp);
return (error);
}
- VOP_UNLOCK(devvp, 0, td);
+ VOP_UNLOCK(devvp, 0);
if ((mp->mnt_flag & MNT_UPDATE) == 0) {
error = iso_mountfs(devvp, mp, td);
@@ -230,7 +230,7 @@ iso_mountfs(devvp, mp, td)
error = g_vfs_open(devvp, &cp, "cd9660", 0);
g_topology_unlock();
PICKUP_GIANT();
- VOP_UNLOCK(devvp, 0, td);
+ VOP_UNLOCK(devvp, 0);
if (error)
return error;
if (devvp->v_rdev->si_iosize_max != 0)
diff --git a/sys/fs/coda/coda_vnops.c b/sys/fs/coda/coda_vnops.c
index 51f9d62..fe0b2c9 100644
--- a/sys/fs/coda/coda_vnops.c
+++ b/sys/fs/coda/coda_vnops.c
@@ -922,7 +922,7 @@ coda_lookup(struct vop_lookup_args *ap)
*/
if (!error || (error == EJUSTRETURN)) {
if (cnp->cn_flags & ISDOTDOT) {
- if ((error = VOP_UNLOCK(dvp, 0, td))) {
+ if ((error = VOP_UNLOCK(dvp, 0))) {
return error;
}
/*
@@ -930,7 +930,7 @@ coda_lookup(struct vop_lookup_args *ap)
* lock it without bothering to check anything else.
*/
if (*ap->a_vpp) {
- if ((error = VOP_LOCK(*ap->a_vpp, LK_EXCLUSIVE, td))) {
+ if ((error = VOP_LOCK(*ap->a_vpp, LK_EXCLUSIVE))) {
vn_lock(dvp, LK_RETRY|LK_EXCLUSIVE);
return (error);
}
@@ -940,7 +940,7 @@ coda_lookup(struct vop_lookup_args *ap)
/* The parent is locked, and may be the same as the child */
if (*ap->a_vpp && (*ap->a_vpp != dvp)) {
/* Different, go ahead and lock it. */
- if ((error = VOP_LOCK(*ap->a_vpp, LK_EXCLUSIVE, td))) {
+ if ((error = VOP_LOCK(*ap->a_vpp, LK_EXCLUSIVE))) {
return (error);
}
}
@@ -1026,7 +1026,7 @@ coda_create(struct vop_create_args *ap)
if (!error) {
if (cnp->cn_flags & LOCKLEAF) {
- if ((error = VOP_LOCK(*ap->a_vpp, LK_EXCLUSIVE, td))) {
+ if ((error = VOP_LOCK(*ap->a_vpp, LK_EXCLUSIVE))) {
printf("coda_create: ");
panic("unlocked parent but couldn't lock child");
}
diff --git a/sys/fs/devfs/devfs_devs.c b/sys/fs/devfs/devfs_devs.c
index 7ca8e6b..1d5e3c9 100644
--- a/sys/fs/devfs/devfs_devs.c
+++ b/sys/fs/devfs/devfs_devs.c
@@ -245,11 +245,9 @@ void
devfs_delete(struct devfs_mount *dm, struct devfs_dirent *de, int vp_locked)
{
struct vnode *vp;
- struct thread *td;
KASSERT((de->de_flags & DE_DOOMED) == 0,
("devfs_delete doomed dirent"));
- td = curthread;
de->de_flags |= DE_DOOMED;
mtx_lock(&devfs_de_interlock);
vp = de->de_vnode;
@@ -264,7 +262,7 @@ devfs_delete(struct devfs_mount *dm, struct devfs_dirent *de, int vp_locked)
VI_UNLOCK(vp);
vgone(vp);
if (!vp_locked)
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vdrop(vp);
sx_xlock(&dm->dm_lock);
} else
diff --git a/sys/fs/devfs/devfs_vfsops.c b/sys/fs/devfs/devfs_vfsops.c
index f3a364b..9a9bc38 100644
--- a/sys/fs/devfs/devfs_vfsops.c
+++ b/sys/fs/devfs/devfs_vfsops.c
@@ -100,7 +100,7 @@ devfs_mount(struct mount *mp, struct thread *td)
return (error);
}
- VOP_UNLOCK(rvp, 0, td);
+ VOP_UNLOCK(rvp, 0);
vfs_mountedfrom(mp, "devfs");
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c
index 5e4fa4d..b08b9fa 100644
--- a/sys/fs/devfs/devfs_vnops.c
+++ b/sys/fs/devfs/devfs_vnops.c
@@ -361,7 +361,7 @@ devfs_close(struct vop_close_args *ap)
vholdl(vp);
VI_UNLOCK(vp);
vp_locked = VOP_ISLOCKED(vp, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
KASSERT(dev->si_refcount > 0,
("devfs_close() on un-referenced struct cdev *(%s)", devtoname(dev)));
if (!(dsw->d_flags & D_NEEDGIANT)) {
@@ -587,7 +587,7 @@ devfs_lookupx(struct vop_lookup_args *ap, int *dm_unlock)
if (flags & ISDOTDOT) {
if ((flags & ISLASTCN) && nameiop != LOOKUP)
return (EINVAL);
- VOP_UNLOCK(dvp, 0, td);
+ VOP_UNLOCK(dvp, 0);
de = TAILQ_FIRST(&dd->de_dlist); /* "." */
de = TAILQ_NEXT(de, de_list); /* ".." */
de = de->de_dir;
@@ -770,7 +770,7 @@ devfs_open(struct vop_open_args *ap)
if (dsw->d_flags & D_TTY)
vp->v_vflag |= VV_ISTTY;
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if(!(dsw->d_flags & D_NEEDGIANT)) {
DROP_GIANT();
@@ -1059,7 +1059,7 @@ devfs_revoke(struct vop_revoke_args *ap)
vgone(vp);
vdrop(vp);
- VOP_UNLOCK(vp,0,curthread);
+ VOP_UNLOCK(vp,0);
loop:
for (;;) {
mtx_lock(&devfs_de_interlock);
diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c
index 6237362..8a283cd 100644
--- a/sys/fs/fdescfs/fdesc_vnops.c
+++ b/sys/fs/fdescfs/fdesc_vnops.c
@@ -411,7 +411,7 @@ fdesc_setattr(ap)
if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) == 0) {
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_SETATTR(vp, ap->a_vap, ap->a_cred, ap->a_td);
- VOP_UNLOCK(vp, 0, ap->a_td);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
}
fdrop(fp, ap->a_td);
diff --git a/sys/fs/fifofs/fifo_vnops.c b/sys/fs/fifofs/fifo_vnops.c
index 4ad3f15..ddbd8ed 100644
--- a/sys/fs/fifofs/fifo_vnops.c
+++ b/sys/fs/fifofs/fifo_vnops.c
@@ -254,7 +254,7 @@ fail1:
}
if ((ap->a_mode & O_NONBLOCK) == 0) {
if ((ap->a_mode & FREAD) && fip->fi_writers == 0) {
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
error = msleep(&fip->fi_readers, &fifo_mtx,
PDROP | PCATCH | PSOCK, "fifoor", 0);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
@@ -274,7 +274,7 @@ fail1:
*/
}
if ((ap->a_mode & FWRITE) && fip->fi_readers == 0) {
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
error = msleep(&fip->fi_writers, &fifo_mtx,
PDROP | PCATCH | PSOCK, "fifoow", 0);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
diff --git a/sys/fs/hpfs/hpfs_vfsops.c b/sys/fs/hpfs/hpfs_vfsops.c
index 2ef7dc6..1e419e0 100644
--- a/sys/fs/hpfs/hpfs_vfsops.c
+++ b/sys/fs/hpfs/hpfs_vfsops.c
@@ -236,7 +236,7 @@ hpfs_mountfs(devvp, mp, td)
error = g_vfs_open(devvp, &cp, "hpfs", ronly ? 0 : 1);
g_topology_unlock();
PICKUP_GIANT();
- VOP_UNLOCK(devvp, 0, td);
+ VOP_UNLOCK(devvp, 0);
if (error)
return (error);
diff --git a/sys/fs/hpfs/hpfs_vnops.c b/sys/fs/hpfs/hpfs_vnops.c
index dc599b6..9d22afa 100644
--- a/sys/fs/hpfs/hpfs_vnops.c
+++ b/sys/fs/hpfs/hpfs_vnops.c
@@ -1063,7 +1063,7 @@ hpfs_lookup(ap)
if (VFS_VGET(hpmp->hpm_mp, dhp->h_fn.fn_parent,
LK_NOWAIT | LK_EXCLUSIVE, ap->a_vpp)) {
- VOP_UNLOCK(dvp,0,cnp->cn_thread);
+ VOP_UNLOCK(dvp,0);
error = VFS_VGET(hpmp->hpm_mp,
dhp->h_fn.fn_parent, LK_EXCLUSIVE, ap->a_vpp);
vn_lock(dvp, LK_EXCLUSIVE|LK_RETRY);
diff --git a/sys/fs/msdosfs/msdosfs_lookup.c b/sys/fs/msdosfs/msdosfs_lookup.c
index 90b72ff..1344f628e 100644
--- a/sys/fs/msdosfs/msdosfs_lookup.c
+++ b/sys/fs/msdosfs/msdosfs_lookup.c
@@ -108,7 +108,6 @@ msdosfs_lookup(ap)
u_char dosfilename[12];
int flags = cnp->cn_flags;
int nameiop = cnp->cn_nameiop;
- struct thread *td = cnp->cn_thread;
int unlen;
int wincnt = 1;
@@ -520,7 +519,7 @@ foundroot:
*/
pdp = vdp;
if (flags & ISDOTDOT) {
- VOP_UNLOCK(pdp, 0, td);
+ VOP_UNLOCK(pdp, 0);
error = deget(pmp, cluster, blkoff, &tdp);
vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY);
if (error)
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c
index 0bc4964..6834381 100644
--- a/sys/fs/msdosfs/msdosfs_vfsops.c
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c
@@ -318,10 +318,10 @@ msdosfs_mount(struct mount *mp, struct thread *td)
if (error)
error = priv_check(td, PRIV_VFS_MOUNT_PERM);
if (error) {
- VOP_UNLOCK(devvp, 0, td);
+ VOP_UNLOCK(devvp, 0);
return (error);
}
- VOP_UNLOCK(devvp, 0, td);
+ VOP_UNLOCK(devvp, 0);
DROP_GIANT();
g_topology_lock();
error = g_access(pmp->pm_cp, 0, 1, 0);
@@ -426,7 +426,7 @@ mountmsdosfs(struct vnode *devvp, struct mount *mp, struct thread *td)
error = g_vfs_open(devvp, &cp, "msdosfs", ronly ? 0 : 1);
g_topology_unlock();
PICKUP_GIANT();
- VOP_UNLOCK(devvp, 0, td);
+ VOP_UNLOCK(devvp, 0);
if (error)
return (error);
@@ -918,7 +918,7 @@ loop:
error = VOP_FSYNC(vp, waitfor, td);
if (error)
allerror = error;
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vrele(vp);
MNT_ILOCK(mp);
}
@@ -932,7 +932,7 @@ loop:
error = VOP_FSYNC(pmp->pm_devvp, waitfor, td);
if (error)
allerror = error;
- VOP_UNLOCK(pmp->pm_devvp, 0, td);
+ VOP_UNLOCK(pmp->pm_devvp, 0);
}
return (allerror);
}
diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c
index a62b927..d12ff51 100644
--- a/sys/fs/msdosfs/msdosfs_vnops.c
+++ b/sys/fs/msdosfs/msdosfs_vnops.c
@@ -982,7 +982,6 @@ msdosfs_rename(ap)
struct vnode *tvp = ap->a_tvp;
struct componentname *tcnp = ap->a_tcnp;
struct componentname *fcnp = ap->a_fcnp;
- struct thread *td = fcnp->cn_thread;
struct denode *ip, *xp, *dp, *zp;
u_char toname[11], oldname[11];
u_long from_diroffset, to_diroffset;
@@ -1053,7 +1052,7 @@ abortit:
(fcnp->cn_flags & ISDOTDOT) ||
(tcnp->cn_flags & ISDOTDOT) ||
(ip->de_flag & DE_RENAME)) {
- VOP_UNLOCK(fvp, 0, td);
+ VOP_UNLOCK(fvp, 0);
error = EINVAL;
goto abortit;
}
@@ -1084,7 +1083,7 @@ abortit:
* call to doscheckpath().
*/
error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_thread);
- VOP_UNLOCK(fvp, 0, td);
+ VOP_UNLOCK(fvp, 0);
if (VTODE(fdvp)->de_StartCluster != VTODE(tdvp)->de_StartCluster)
newparent = 1;
if (doingdirectory && newparent) {
@@ -1153,7 +1152,7 @@ abortit:
if ((fcnp->cn_flags & SAVESTART) == 0)
panic("msdosfs_rename: lost from startdir");
if (!newparent)
- VOP_UNLOCK(tdvp, 0, td);
+ VOP_UNLOCK(tdvp, 0);
if (relookup(fdvp, &fvp, fcnp) == 0)
vrele(fdvp);
if (fvp == NULL) {
@@ -1163,7 +1162,7 @@ abortit:
if (doingdirectory)
panic("rename: lost dir entry");
if (newparent)
- VOP_UNLOCK(tdvp, 0, td);
+ VOP_UNLOCK(tdvp, 0);
vrele(tdvp);
vrele(ap->a_fvp);
return 0;
@@ -1183,9 +1182,9 @@ abortit:
if (xp != ip) {
if (doingdirectory)
panic("rename: lost dir entry");
- VOP_UNLOCK(fvp, 0, td);
+ VOP_UNLOCK(fvp, 0);
if (newparent)
- VOP_UNLOCK(fdvp, 0, td);
+ VOP_UNLOCK(fdvp, 0);
vrele(ap->a_fvp);
xp = NULL;
} else {
@@ -1208,8 +1207,8 @@ abortit:
if (error) {
bcopy(oldname, ip->de_Name, 11);
if (newparent)
- VOP_UNLOCK(fdvp, 0, td);
- VOP_UNLOCK(fvp, 0, td);
+ VOP_UNLOCK(fdvp, 0);
+ VOP_UNLOCK(fvp, 0);
goto bad;
}
ip->de_refcnt++;
@@ -1218,8 +1217,8 @@ abortit:
if (error) {
/* XXX should downgrade to ro here, fs is corrupt */
if (newparent)
- VOP_UNLOCK(fdvp, 0, td);
- VOP_UNLOCK(fvp, 0, td);
+ VOP_UNLOCK(fdvp, 0);
+ VOP_UNLOCK(fvp, 0);
goto bad;
}
if (!doingdirectory) {
@@ -1228,8 +1227,8 @@ abortit:
if (error) {
/* XXX should downgrade to ro here, fs is corrupt */
if (newparent)
- VOP_UNLOCK(fdvp, 0, td);
- VOP_UNLOCK(fvp, 0, td);
+ VOP_UNLOCK(fdvp, 0);
+ VOP_UNLOCK(fvp, 0);
goto bad;
}
if (ip->de_dirclust == MSDOSFSROOT)
@@ -1239,7 +1238,7 @@ abortit:
}
reinsert(ip);
if (newparent)
- VOP_UNLOCK(fdvp, 0, td);
+ VOP_UNLOCK(fdvp, 0);
}
/*
@@ -1258,7 +1257,7 @@ abortit:
if (error) {
/* XXX should downgrade to ro here, fs is corrupt */
brelse(bp);
- VOP_UNLOCK(fvp, 0, td);
+ VOP_UNLOCK(fvp, 0);
goto bad;
}
dotdotp = (struct direntry *)bp->b_data + 1;
@@ -1269,12 +1268,12 @@ abortit:
bdwrite(bp);
else if ((error = bwrite(bp)) != 0) {
/* XXX should downgrade to ro here, fs is corrupt */
- VOP_UNLOCK(fvp, 0, td);
+ VOP_UNLOCK(fvp, 0);
goto bad;
}
}
- VOP_UNLOCK(fvp, 0, td);
+ VOP_UNLOCK(fvp, 0);
bad:
if (xp)
vput(tvp);
@@ -1473,7 +1472,7 @@ msdosfs_rmdir(ap)
* the name cache.
*/
cache_purge(dvp);
- VOP_UNLOCK(dvp, 0, td);
+ VOP_UNLOCK(dvp, 0);
/*
* Truncate the directory that is being deleted.
*/
diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c
index f5e8015..e79072d 100644
--- a/sys/fs/ntfs/ntfs_vfsops.c
+++ b/sys/fs/ntfs/ntfs_vfsops.c
@@ -284,7 +284,7 @@ ntfs_mountfs(devvp, mp, td)
g_topology_unlock();
PICKUP_GIANT();
- VOP_UNLOCK(devvp, 0, td);
+ VOP_UNLOCK(devvp, 0);
if (error)
return (error);
diff --git a/sys/fs/ntfs/ntfs_vnops.c b/sys/fs/ntfs/ntfs_vnops.c
index 8d30ec3..01441b7 100644
--- a/sys/fs/ntfs/ntfs_vnops.c
+++ b/sys/fs/ntfs/ntfs_vnops.c
@@ -657,7 +657,7 @@ ntfs_lookup(ap)
if(error)
return (error);
- VOP_UNLOCK(dvp,0,cnp->cn_thread);
+ VOP_UNLOCK(dvp,0);
dprintf(("ntfs_lookup: parentdir: %d\n",
vap->va_a_name->n_pnumber));
error = VFS_VGET(ntmp->ntm_mountp, vap->va_a_name->n_pnumber,
diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c
index 9f1caf8..e2e48dd 100644
--- a/sys/fs/nullfs/null_vfsops.c
+++ b/sys/fs/nullfs/null_vfsops.c
@@ -108,7 +108,7 @@ nullfs_mount(struct mount *mp, struct thread *td)
*/
if ((mp->mnt_vnodecovered->v_op == &null_vnodeops) &&
VOP_ISLOCKED(mp->mnt_vnodecovered, NULL)) {
- VOP_UNLOCK(mp->mnt_vnodecovered, 0, td);
+ VOP_UNLOCK(mp->mnt_vnodecovered, 0);
isvnunlocked = 1;
}
/*
@@ -158,7 +158,7 @@ nullfs_mount(struct mount *mp, struct thread *td)
* Make sure the node alias worked
*/
if (error) {
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vrele(lowerrootvp);
free(xmp, M_NULLFSMNT); /* XXX */
return (error);
@@ -175,7 +175,7 @@ nullfs_mount(struct mount *mp, struct thread *td)
/*
* Unlock the node (either the lower or the alias)
*/
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if (NULLVPTOLOWERVP(nullm_rootvp)->v_mount->mnt_flag & MNT_LOCAL) {
MNT_ILOCK(mp);
diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c
index 66ccc7f..cdc45b7 100644
--- a/sys/fs/nullfs/null_vnops.c
+++ b/sys/fs/nullfs/null_vnops.c
@@ -296,7 +296,7 @@ null_bypass(struct vop_generic_args *ap)
*(vps_p[i]) = old_vps[i];
#if 0
if (reles & VDESC_VP0_WILLUNLOCK)
- VOP_UNLOCK(*(vps_p[i]), 0, curthread);
+ VOP_UNLOCK(*(vps_p[i]), 0);
#endif
if (reles & VDESC_VP0_WILLRELE)
vrele(*(vps_p[i]));
@@ -513,7 +513,6 @@ null_lock(struct vop_lock1_args *ap)
{
struct vnode *vp = ap->a_vp;
int flags = ap->a_flags;
- struct thread *td = ap->a_td;
struct null_node *nn;
struct vnode *lvp;
int error;
@@ -544,7 +543,7 @@ null_lock(struct vop_lock1_args *ap)
* here.
*/
vholdl(lvp);
- error = VOP_LOCK(lvp, flags, td);
+ error = VOP_LOCK(lvp, flags);
/*
* We might have slept to get the lock and someone might have
@@ -566,7 +565,7 @@ null_lock(struct vop_lock1_args *ap)
panic("Unsupported lock request %d\n",
ap->a_flags);
}
- VOP_UNLOCK(lvp, 0, td);
+ VOP_UNLOCK(lvp, 0);
error = vop_stdlock(ap);
}
vdrop(lvp);
@@ -587,7 +586,6 @@ null_unlock(struct vop_unlock_args *ap)
struct vnode *vp = ap->a_vp;
int flags = ap->a_flags;
int mtxlkflag = 0;
- struct thread *td = ap->a_td;
struct null_node *nn;
struct vnode *lvp;
int error;
@@ -604,7 +602,7 @@ null_unlock(struct vop_unlock_args *ap)
flags |= LK_INTERLOCK;
vholdl(lvp);
VI_UNLOCK(vp);
- error = VOP_UNLOCK(lvp, flags, td);
+ error = VOP_UNLOCK(lvp, flags);
vdrop(lvp);
if (mtxlkflag == 0)
VI_LOCK(vp);
diff --git a/sys/fs/nwfs/nwfs_vfsops.c b/sys/fs/nwfs/nwfs_vfsops.c
index dada87d..f795b7a 100644
--- a/sys/fs/nwfs/nwfs_vfsops.c
+++ b/sys/fs/nwfs/nwfs_vfsops.c
@@ -230,7 +230,7 @@ static int nwfs_mount(struct mount *mp, struct thread *td)
/*
* Lose the lock but keep the ref.
*/
- VOP_UNLOCK(vp, 0, curthread);
+ VOP_UNLOCK(vp, 0);
NCPVODEBUG("rootvp.vrefcnt=%d\n",vrefcnt(vp));
return error;
bad:
diff --git a/sys/fs/nwfs/nwfs_vnops.c b/sys/fs/nwfs/nwfs_vnops.c
index 9cd9da9..8235604 100644
--- a/sys/fs/nwfs/nwfs_vnops.c
+++ b/sys/fs/nwfs/nwfs_vnops.c
@@ -958,7 +958,7 @@ printf("dvp %d:%d:%d\n", (int)mp, (int)dvp->v_vflag & VV_ROOT, (int)flags & ISDO
return (0);
}
if (flags & ISDOTDOT) {
- VOP_UNLOCK(dvp, 0, td); /* race to get the inode */
+ VOP_UNLOCK(dvp, 0); /* race to get the inode */
error = nwfs_nget(mp, fid, NULL, NULL, &vp);
vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
if (error)
diff --git a/sys/fs/procfs/procfs.c b/sys/fs/procfs/procfs.c
index 30d1675..bc0efda 100644
--- a/sys/fs/procfs/procfs.c
+++ b/sys/fs/procfs/procfs.c
@@ -80,7 +80,7 @@ procfs_doprocfile(PFS_FILL_ARGS)
if (err)
return (err);
vn_fullpath(td, textvp, &fullpath, &freepath);
- VOP_UNLOCK(textvp, 0, td);
+ VOP_UNLOCK(textvp, 0);
sbuf_printf(sb, "%s", fullpath);
if (freepath)
free(freepath, M_TEMP);
diff --git a/sys/fs/pseudofs/pseudofs_vncache.c b/sys/fs/pseudofs/pseudofs_vncache.c
index 36c03b4..ba57602 100644
--- a/sys/fs/pseudofs/pseudofs_vncache.c
+++ b/sys/fs/pseudofs/pseudofs_vncache.c
@@ -268,9 +268,9 @@ pfs_purge(struct pfs_node *pn)
vnp = pvd->pvd_vnode;
vhold(vnp);
mtx_unlock(&pfs_vncache_mutex);
- VOP_LOCK(vnp, LK_EXCLUSIVE, curthread);
+ VOP_LOCK(vnp, LK_EXCLUSIVE);
vgone(vnp);
- VOP_UNLOCK(vnp, 0, curthread);
+ VOP_UNLOCK(vnp, 0);
vdrop(vnp);
mtx_lock(&pfs_vncache_mutex);
pvd = pfs_vncache;
diff --git a/sys/fs/pseudofs/pseudofs_vnops.c b/sys/fs/pseudofs/pseudofs_vnops.c
index 722a262..2933784 100644
--- a/sys/fs/pseudofs/pseudofs_vnops.c
+++ b/sys/fs/pseudofs/pseudofs_vnops.c
@@ -366,7 +366,7 @@ pfs_lookup(struct vop_cachedlookup_args *va)
if (cnp->cn_flags & ISDOTDOT) {
if (pd->pn_type == pfstype_root)
PFS_RETURN (EIO);
- VOP_UNLOCK(vn, 0, cnp->cn_thread);
+ VOP_UNLOCK(vn, 0);
KASSERT(pd->pn_parent != NULL,
("%s(): non-root directory has no parent", __func__));
/*
diff --git a/sys/fs/smbfs/smbfs_vfsops.c b/sys/fs/smbfs/smbfs_vfsops.c
index 3b73ea3..2dc9e6d 100644
--- a/sys/fs/smbfs/smbfs_vfsops.c
+++ b/sys/fs/smbfs/smbfs_vfsops.c
@@ -253,7 +253,7 @@ smbfs_mount(struct mount *mp, struct thread *td)
vfs_mount_error(mp, "smbfs_root error: %d", error);
goto bad;
}
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
SMBVDEBUG("root.v_usecount = %d\n", vrefcnt(vp));
#ifdef DIAGNOSTICS
diff --git a/sys/fs/smbfs/smbfs_vnops.c b/sys/fs/smbfs/smbfs_vnops.c
index d697f1a..d17b1d1 100644
--- a/sys/fs/smbfs/smbfs_vnops.c
+++ b/sys/fs/smbfs/smbfs_vnops.c
@@ -1247,7 +1247,7 @@ smbfs_lookup(ap)
return 0;
}
if (flags & ISDOTDOT) {
- VOP_UNLOCK(dvp, 0, td);
+ VOP_UNLOCK(dvp, 0);
error = smbfs_nget(mp, dvp, name, nmlen, NULL, &vp);
vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
if (error)
diff --git a/sys/fs/tmpfs/tmpfs_vfsops.c b/sys/fs/tmpfs/tmpfs_vfsops.c
index 3640bdc..b5fbd3c 100644
--- a/sys/fs/tmpfs/tmpfs_vfsops.c
+++ b/sys/fs/tmpfs/tmpfs_vfsops.c
@@ -219,7 +219,7 @@ tmpfs_mount(struct mount *mp, struct thread *td)
vn_lock(mp->mnt_vnodecovered, LK_SHARED | LK_RETRY);
error = VOP_GETATTR(mp->mnt_vnodecovered, &va, mp->mnt_cred, td);
- VOP_UNLOCK(mp->mnt_vnodecovered, 0, td);
+ VOP_UNLOCK(mp->mnt_vnodecovered, 0);
if (error)
return (error);
diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c
index 1cc7e72..a0b4b84 100644
--- a/sys/fs/tmpfs/tmpfs_vnops.c
+++ b/sys/fs/tmpfs/tmpfs_vnops.c
@@ -99,7 +99,7 @@ tmpfs_lookup(struct vop_cachedlookup_args *v)
ltype = VOP_ISLOCKED(dvp, td);
vhold(dvp);
- VOP_UNLOCK(dvp, 0, td);
+ VOP_UNLOCK(dvp, 0);
/* Allocate a new vnode on the matching entry. */
error = tmpfs_alloc_vp(dvp->v_mount, dnode->tn_dir.tn_parent,
cnp->cn_lkflags, vpp, td);
@@ -1056,7 +1056,7 @@ tmpfs_rename(struct vop_rename_args *v)
out_locked:
if (fdnode != tdnode)
- VOP_UNLOCK(fdvp, 0, tcnp->cn_thread);
+ VOP_UNLOCK(fdvp, 0);
out:
/* Release target nodes. */
diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c
index 36984d3..8810061 100644
--- a/sys/fs/udf/udf_vfsops.c
+++ b/sys/fs/udf/udf_vfsops.c
@@ -324,7 +324,7 @@ udf_mountfs(struct vnode *devvp, struct mount *mp, struct thread *td) {
error = g_vfs_open(devvp, &cp, "udf", 0);
g_topology_unlock();
PICKUP_GIANT();
- VOP_UNLOCK(devvp, 0, td);
+ VOP_UNLOCK(devvp, 0);
if (error)
return error;
diff --git a/sys/fs/udf/udf_vnops.c b/sys/fs/udf/udf_vnops.c
index a13a100..18fda9b 100644
--- a/sys/fs/udf/udf_vnops.c
+++ b/sys/fs/udf/udf_vnops.c
@@ -955,7 +955,7 @@ lookloop:
/* Did we have a match? */
if (id) {
if (flags & ISDOTDOT)
- VOP_UNLOCK(dvp, 0, a->a_cnp->cn_thread);
+ VOP_UNLOCK(dvp, 0);
error = udf_vget(udfmp->im_mountp, id, LK_EXCLUSIVE, &tdp);
if (flags & ISDOTDOT)
vn_lock(dvp, LK_EXCLUSIVE|LK_RETRY);
diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c
index 85d7da0..590d472 100644
--- a/sys/fs/unionfs/union_subr.c
+++ b/sys/fs/unionfs/union_subr.c
@@ -200,9 +200,9 @@ unionfs_noderem(struct vnode *vp, struct thread *td)
vp->v_data = NULL;
lockmgr(vp->v_vnlock, LK_EXCLUSIVE | LK_INTERLOCK, VI_MTX(vp), td);
if (lvp != NULLVP)
- VOP_UNLOCK(lvp, 0, td);
+ VOP_UNLOCK(lvp, 0);
if (uvp != NULLVP)
- VOP_UNLOCK(uvp, 0, td);
+ VOP_UNLOCK(uvp, 0);
vp->v_object = NULL;
if (lvp != NULLVP) {
@@ -381,7 +381,7 @@ unionfs_relookup(struct vnode *dvp, struct vnode **vpp,
cn->cn_flags |= (cnp->cn_flags & SAVESTART);
vref(dvp);
- VOP_UNLOCK(dvp, 0, td);
+ VOP_UNLOCK(dvp, 0);
if ((error = relookup(dvp, vpp, cn))) {
uma_zfree(namei_zone, cn->cn_pnbuf);
@@ -776,7 +776,7 @@ unionfs_vn_create_on_upper(struct vnode **vpp, struct vnode *udvp,
*vpp = vp;
unionfs_vn_create_on_upper_free_out1:
- VOP_UNLOCK(udvp, 0, td);
+ VOP_UNLOCK(udvp, 0);
unionfs_vn_create_on_upper_free_out2:
if (cn.cn_flags & HASBUF) {
diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c
index 0f8fb73..75ab212 100644
--- a/sys/fs/unionfs/union_vfsops.c
+++ b/sys/fs/unionfs/union_vfsops.c
@@ -200,7 +200,7 @@ unionfs_domount(struct mount *mp, struct thread *td)
uid = va.va_uid;
gid = va.va_gid;
}
- VOP_UNLOCK(mp->mnt_vnodecovered, 0, td);
+ VOP_UNLOCK(mp->mnt_vnodecovered, 0);
if (error)
return (error);
@@ -288,7 +288,7 @@ unionfs_domount(struct mount *mp, struct thread *td)
* Save reference
*/
if (below) {
- VOP_UNLOCK(upperrootvp, 0, td);
+ VOP_UNLOCK(upperrootvp, 0);
vn_lock(lowerrootvp, LK_EXCLUSIVE | LK_RETRY);
ump->um_lowervp = upperrootvp;
ump->um_uppervp = lowerrootvp;
@@ -326,7 +326,7 @@ unionfs_domount(struct mount *mp, struct thread *td)
error = VOP_WHITEOUT(ump->um_uppervp, &fakecn, LOOKUP);
if (error) {
if (below) {
- VOP_UNLOCK(ump->um_uppervp, 0, td);
+ VOP_UNLOCK(ump->um_uppervp, 0);
vrele(upperrootvp);
} else
vput(ump->um_uppervp);
@@ -339,7 +339,7 @@ unionfs_domount(struct mount *mp, struct thread *td)
/*
* Unlock the node
*/
- VOP_UNLOCK(ump->um_uppervp, 0, td);
+ VOP_UNLOCK(ump->um_uppervp, 0);
/*
* Get the unionfs root vnode.
diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c
index 2627111..b898083 100644
--- a/sys/fs/unionfs/union_vnops.c
+++ b/sys/fs/unionfs/union_vnops.c
@@ -137,7 +137,7 @@ unionfs_lookup(struct vop_cachedlookup_args *ap)
if (udvp != NULLVP) {
dtmpvp = udvp;
if (ldvp != NULLVP)
- VOP_UNLOCK(ldvp, 0, td);
+ VOP_UNLOCK(ldvp, 0);
}
else
dtmpvp = ldvp;
@@ -145,7 +145,7 @@ unionfs_lookup(struct vop_cachedlookup_args *ap)
error = VOP_LOOKUP(dtmpvp, &vp, cnp);
if (dtmpvp == udvp && ldvp != NULLVP) {
- VOP_UNLOCK(udvp, 0, td);
+ VOP_UNLOCK(udvp, 0);
vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
}
@@ -157,10 +157,10 @@ unionfs_lookup(struct vop_cachedlookup_args *ap)
*/
if (nameiop == DELETE || nameiop == RENAME ||
(cnp->cn_lkflags & LK_TYPE_MASK))
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vrele(vp);
- VOP_UNLOCK(dvp, 0, td);
+ VOP_UNLOCK(dvp, 0);
*(ap->a_vpp) = dunp->un_dvp;
vref(dunp->un_dvp);
@@ -198,7 +198,7 @@ unionfs_lookup(struct vop_cachedlookup_args *ap)
}
if (nameiop == DELETE || nameiop == RENAME ||
(cnp->cn_lkflags & LK_TYPE_MASK))
- VOP_UNLOCK(uvp, 0, td);
+ VOP_UNLOCK(uvp, 0);
}
/* check whiteout */
@@ -242,7 +242,7 @@ unionfs_lookup(struct vop_cachedlookup_args *ap)
return (lerror);
}
if (cnp->cn_lkflags & LK_TYPE_MASK)
- VOP_UNLOCK(lvp, 0, td);
+ VOP_UNLOCK(lvp, 0);
}
}
@@ -277,7 +277,7 @@ unionfs_lookup(struct vop_cachedlookup_args *ap)
goto unionfs_lookup_out;
if (LK_SHARED == (cnp->cn_lkflags & LK_TYPE_MASK))
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if (LK_EXCLUSIVE != VOP_ISLOCKED(vp, td)) {
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
lockflag = 1;
@@ -285,7 +285,7 @@ unionfs_lookup(struct vop_cachedlookup_args *ap)
error = unionfs_mkshadowdir(MOUNTTOUNIONFSMOUNT(dvp->v_mount),
udvp, VTOUNIONFS(vp), cnp, td);
if (lockflag != 0)
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if (error != 0) {
UNIONFSDEBUG("unionfs_lookup: Unable to create shadow dir.");
if ((cnp->cn_lkflags & LK_TYPE_MASK) == LK_EXCLUSIVE)
@@ -342,7 +342,6 @@ unionfs_create(struct vop_create_args *ap)
{
struct unionfs_node *dunp;
struct componentname *cnp;
- struct thread *td;
struct vnode *udvp;
struct vnode *vp;
int error;
@@ -351,15 +350,14 @@ unionfs_create(struct vop_create_args *ap)
dunp = VTOUNIONFS(ap->a_dvp);
cnp = ap->a_cnp;
- td = curthread;
udvp = dunp->un_uppervp;
error = EROFS;
if (udvp != NULLVP) {
if ((error = VOP_CREATE(udvp, &vp, cnp, ap->a_vap)) == 0) {
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
error = unionfs_nodeget(ap->a_dvp->v_mount, vp, NULLVP,
- ap->a_dvp, ap->a_vpp, cnp, td);
+ ap->a_dvp, ap->a_vpp, cnp, curthread);
vrele(vp);
}
}
@@ -407,7 +405,6 @@ unionfs_mknod(struct vop_mknod_args *ap)
{
struct unionfs_node *dunp;
struct componentname *cnp;
- struct thread *td;
struct vnode *udvp;
struct vnode *vp;
int error;
@@ -416,15 +413,14 @@ unionfs_mknod(struct vop_mknod_args *ap)
dunp = VTOUNIONFS(ap->a_dvp);
cnp = ap->a_cnp;
- td = curthread;
udvp = dunp->un_uppervp;
error = EROFS;
if (udvp != NULLVP) {
if ((error = VOP_MKNOD(udvp, &vp, cnp, ap->a_vap)) == 0) {
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
error = unionfs_nodeget(ap->a_dvp->v_mount, vp, NULLVP,
- ap->a_dvp, ap->a_vpp, cnp, td);
+ ap->a_dvp, ap->a_vpp, cnp, curthread);
vrele(vp);
}
}
@@ -576,7 +572,7 @@ unionfs_close_abort:
unionfs_tryrem_node_status(unp, td, unsp);
if (locked != 0)
- VOP_UNLOCK(ap->a_vp, 0, td);
+ VOP_UNLOCK(ap->a_vp, 0);
UNIONFS_INTERNAL_DEBUG("unionfs_close: leave (%d)\n", error);
@@ -882,7 +878,7 @@ unionfs_ioctl(struct vop_ioctl_args *ap)
unionfs_get_node_status(unp, ap->a_td, &unsp);
ovp = (unsp->uns_upper_opencnt ? unp->un_uppervp : unp->un_lowervp);
unionfs_tryrem_node_status(unp, ap->a_td, unsp);
- VOP_UNLOCK(ap->a_vp, 0, ap->a_td);
+ VOP_UNLOCK(ap->a_vp, 0);
if (ovp == NULLVP)
return (EBADF);
@@ -907,7 +903,7 @@ unionfs_poll(struct vop_poll_args *ap)
unionfs_get_node_status(unp, ap->a_td, &unsp);
ovp = (unsp->uns_upper_opencnt ? unp->un_uppervp : unp->un_lowervp);
unionfs_tryrem_node_status(unp, ap->a_td, unsp);
- VOP_UNLOCK(ap->a_vp, 0, ap->a_td);
+ VOP_UNLOCK(ap->a_vp, 0);
if (ovp == NULLVP)
return (EBADF);
@@ -1111,7 +1107,7 @@ unionfs_rename(struct vop_rename_args *ap)
if ((error = vn_lock(fvp, LK_EXCLUSIVE)) != 0)
goto unionfs_rename_abort;
error = unionfs_copyfile(unp, 1, fcnp->cn_cred, td);
- VOP_UNLOCK(fvp, 0, td);
+ VOP_UNLOCK(fvp, 0);
if (error != 0)
goto unionfs_rename_abort;
break;
@@ -1119,7 +1115,7 @@ unionfs_rename(struct vop_rename_args *ap)
if ((error = vn_lock(fvp, LK_EXCLUSIVE)) != 0)
goto unionfs_rename_abort;
error = unionfs_mkshadowdir(ump, rfdvp, unp, fcnp, td);
- VOP_UNLOCK(fvp, 0, td);
+ VOP_UNLOCK(fvp, 0);
if (error != 0)
goto unionfs_rename_abort;
break;
@@ -1173,13 +1169,13 @@ unionfs_rename(struct vop_rename_args *ap)
if ((error = vn_lock(fdvp, LK_EXCLUSIVE)) != 0)
goto unionfs_rename_abort;
error = unionfs_relookup_for_delete(fdvp, fcnp, td);
- VOP_UNLOCK(fdvp, 0, td);
+ VOP_UNLOCK(fdvp, 0);
if (error != 0)
goto unionfs_rename_abort;
/* Locke of tvp is canceled in order to avoid recursive lock. */
if (tvp != NULLVP && tvp != tdvp)
- VOP_UNLOCK(tvp, 0, td);
+ VOP_UNLOCK(tvp, 0);
error = unionfs_relookup_for_rename(tdvp, tcnp, td);
if (tvp != NULLVP && tvp != tdvp)
vn_lock(tvp, LK_EXCLUSIVE | LK_RETRY);
@@ -1201,11 +1197,11 @@ unionfs_rename(struct vop_rename_args *ap)
if (fvp != rfvp)
vrele(fvp);
if (ltdvp != NULLVP)
- VOP_UNLOCK(ltdvp, 0, td);
+ VOP_UNLOCK(ltdvp, 0);
if (tdvp != rtdvp)
vrele(tdvp);
if (ltvp != NULLVP)
- VOP_UNLOCK(ltvp, 0, td);
+ VOP_UNLOCK(ltvp, 0);
if (tvp != rtvp && tvp != NULLVP) {
if (rtvp == NULLVP)
vput(tvp);
@@ -1273,7 +1269,7 @@ unionfs_mkdir(struct vop_mkdir_args *ap)
}
if ((error = VOP_MKDIR(udvp, &uvp, cnp, ap->a_vap)) == 0) {
- VOP_UNLOCK(uvp, 0, td);
+ VOP_UNLOCK(uvp, 0);
cnp->cn_lkflags = LK_EXCLUSIVE;
error = unionfs_nodeget(ap->a_dvp->v_mount, uvp, NULLVP,
ap->a_dvp, ap->a_vpp, cnp, td);
@@ -1364,7 +1360,7 @@ unionfs_symlink(struct vop_symlink_args *ap)
if (udvp != NULLVP) {
error = VOP_SYMLINK(udvp, &uvp, cnp, ap->a_vap, ap->a_target);
if (error == 0) {
- VOP_UNLOCK(uvp, 0, td);
+ VOP_UNLOCK(uvp, 0);
cnp->cn_lkflags = LK_EXCLUSIVE;
error = unionfs_nodeget(ap->a_dvp->v_mount, uvp, NULLVP,
ap->a_dvp, ap->a_vpp, cnp, td);
@@ -1661,16 +1657,14 @@ unionfs_lock(struct vop_lock1_args *ap)
struct vnode *vp;
struct vnode *uvp;
struct vnode *lvp;
- struct thread *td;
error = 0;
uhold = 0;
flags = ap->a_flags;
vp = ap->a_vp;
- td = ap->a_td;
if (LK_RELEASE == (flags & LK_TYPE_MASK) || !(flags & LK_TYPE_MASK))
- return (VOP_UNLOCK(vp, flags, td));
+ return (VOP_UNLOCK(vp, flags));
if ((revlock = unionfs_get_llt_revlock(flags)) == 0)
panic("unknown lock type: 0x%x", flags & LK_TYPE_MASK);
@@ -1709,14 +1703,14 @@ unionfs_lock(struct vop_lock1_args *ap)
VI_UNLOCK(vp);
ap->a_flags &= ~LK_INTERLOCK;
- error = VOP_LOCK(lvp, flags, td);
+ error = VOP_LOCK(lvp, flags);
VI_LOCK(vp);
unp = VTOUNIONFS(vp);
if (unp == NULL) {
VI_UNLOCK(vp);
if (error == 0)
- VOP_UNLOCK(lvp, 0, td);
+ VOP_UNLOCK(lvp, 0);
vdrop(lvp);
return (vop_stdlock(ap));
}
@@ -1731,16 +1725,16 @@ unionfs_lock(struct vop_lock1_args *ap)
VI_UNLOCK(vp);
ap->a_flags &= ~LK_INTERLOCK;
- error = VOP_LOCK(uvp, flags, td);
+ error = VOP_LOCK(uvp, flags);
VI_LOCK(vp);
unp = VTOUNIONFS(vp);
if (unp == NULL) {
VI_UNLOCK(vp);
if (error == 0) {
- VOP_UNLOCK(uvp, 0, td);
+ VOP_UNLOCK(uvp, 0);
if (lvp != NULLVP)
- VOP_UNLOCK(lvp, 0, td);
+ VOP_UNLOCK(lvp, 0);
}
if (lvp != NULLVP)
vdrop(lvp);
@@ -1751,7 +1745,7 @@ unionfs_lock(struct vop_lock1_args *ap)
if (error != 0 && lvp != NULLVP) {
VI_UNLOCK(vp);
if ((revlock & LK_TYPE_MASK) == LK_RELEASE)
- VOP_UNLOCK(lvp, revlock, td);
+ VOP_UNLOCK(lvp, revlock);
else
vn_lock(lvp, revlock | LK_RETRY);
goto unionfs_lock_abort;
@@ -1811,7 +1805,7 @@ unionfs_unlock(struct vop_unlock_args *ap)
VI_UNLOCK(vp);
ap->a_flags &= ~LK_INTERLOCK;
- error = VOP_UNLOCK(lvp, flags, ap->a_td);
+ error = VOP_UNLOCK(lvp, flags);
VI_LOCK(vp);
}
@@ -1825,7 +1819,7 @@ unionfs_unlock(struct vop_unlock_args *ap)
VI_UNLOCK(vp);
ap->a_flags &= ~LK_INTERLOCK;
- error = VOP_UNLOCK(uvp, flags, ap->a_td);
+ error = VOP_UNLOCK(uvp, flags);
VI_LOCK(vp);
}
@@ -1898,7 +1892,7 @@ unionfs_advlock(struct vop_advlock_args *ap)
unionfs_tryrem_node_status(unp, td, unsp);
}
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
error = VOP_ADVLOCK(uvp, ap->a_id, ap->a_op, ap->a_fl, ap->a_flags);
@@ -1907,7 +1901,7 @@ unionfs_advlock(struct vop_advlock_args *ap)
return error;
unionfs_advlock_abort:
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
UNIONFS_INTERNAL_DEBUG("unionfs_advlock: leave (%d)\n", error);
diff --git a/sys/gnu/fs/ext2fs/ext2_lookup.c b/sys/gnu/fs/ext2fs/ext2_lookup.c
index 004c140..1d47000 100644
--- a/sys/gnu/fs/ext2fs/ext2_lookup.c
+++ b/sys/gnu/fs/ext2fs/ext2_lookup.c
@@ -318,7 +318,6 @@ ext2_lookup(ap)
struct ucred *cred = cnp->cn_cred;
int flags = cnp->cn_flags;
int nameiop = cnp->cn_nameiop;
- struct thread *td = cnp->cn_thread;
ino_t saved_ino;
int DIRBLKSIZ = VTOI(ap->a_dvp)->i_e2fs->s_blocksize;
@@ -657,7 +656,7 @@ found:
pdp = vdp;
if (flags & ISDOTDOT) {
saved_ino = dp->i_ino;
- VOP_UNLOCK(pdp, 0, td); /* race to get the inode */
+ VOP_UNLOCK(pdp, 0); /* race to get the inode */
error = VFS_VGET(vdp->v_mount, saved_ino, LK_EXCLUSIVE, &tdp);
vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY);
if (error != 0)
diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c
index 06e42cb..79a5776 100644
--- a/sys/gnu/fs/ext2fs/ext2_vfsops.c
+++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c
@@ -205,10 +205,10 @@ ext2_mount(mp, td)
if (error)
error = priv_check(td, PRIV_VFS_MOUNT_PERM);
if (error) {
- VOP_UNLOCK(devvp, 0, td);
+ VOP_UNLOCK(devvp, 0);
return (error);
}
- VOP_UNLOCK(devvp, 0, td);
+ VOP_UNLOCK(devvp, 0);
DROP_GIANT();
g_topology_lock();
error = g_access(ump->um_cp, 0, 1, 0);
@@ -520,7 +520,7 @@ ext2_reload(struct mount *mp, struct thread *td)
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
if (vinvalbuf(devvp, 0, td, 0, 0) != 0)
panic("ext2_reload: dirty1");
- VOP_UNLOCK(devvp, 0, td);
+ VOP_UNLOCK(devvp, 0);
/*
* Step 2: re-read superblock from disk.
@@ -572,7 +572,7 @@ loop:
bread(devvp, fsbtodb(fs, ino_to_fsba(fs, ip->i_number)),
(int)fs->s_blocksize, NOCRED, &bp);
if (error) {
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vrele(vp);
MNT_VNODE_FOREACH_ABORT(mp, mvp);
return (error);
@@ -580,7 +580,7 @@ loop:
ext2_ei2i((struct ext2_inode *) ((char *)bp->b_data +
EXT2_INODE_SIZE * ino_to_fsbo(fs, ip->i_number)), ip);
brelse(bp);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vrele(vp);
MNT_ILOCK(mp);
}
@@ -614,7 +614,7 @@ ext2_mountfs(devvp, mp, td)
error = g_vfs_open(devvp, &cp, "ext2fs", ronly ? 0 : 1);
g_topology_unlock();
PICKUP_GIANT();
- VOP_UNLOCK(devvp, 0, td);
+ VOP_UNLOCK(devvp, 0);
if (error)
return (error);
@@ -907,7 +907,7 @@ loop:
}
if ((error = VOP_FSYNC(vp, waitfor, td)) != 0)
allerror = error;
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vrele(vp);
MNT_ILOCK(mp);
}
@@ -919,7 +919,7 @@ loop:
vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY);
if ((error = VOP_FSYNC(ump->um_devvp, waitfor, td)) != 0)
allerror = error;
- VOP_UNLOCK(ump->um_devvp, 0, td);
+ VOP_UNLOCK(ump->um_devvp, 0);
}
/*
* Write back modified superblock.
diff --git a/sys/gnu/fs/ext2fs/ext2_vnops.c b/sys/gnu/fs/ext2fs/ext2_vnops.c
index e1b5f4e..eaf7443 100644
--- a/sys/gnu/fs/ext2fs/ext2_vnops.c
+++ b/sys/gnu/fs/ext2fs/ext2_vnops.c
@@ -767,7 +767,6 @@ ext2_rename(ap)
struct vnode *fdvp = ap->a_fdvp;
struct componentname *tcnp = ap->a_tcnp;
struct componentname *fcnp = ap->a_fcnp;
- struct thread *td = fcnp->cn_thread;
struct inode *ip, *xp, *dp;
struct dirtemplate dirbuf;
int doingdirectory = 0, oldparent = 0, newparent = 0;
@@ -818,13 +817,13 @@ abortit:
dp = VTOI(fdvp);
ip = VTOI(fvp);
if (ip->i_nlink >= LINK_MAX) {
- VOP_UNLOCK(fvp, 0, td);
+ VOP_UNLOCK(fvp, 0);
error = EMLINK;
goto abortit;
}
if ((ip->i_flags & (NOUNLINK | IMMUTABLE | APPEND))
|| (dp->i_flags & APPEND)) {
- VOP_UNLOCK(fvp, 0, td);
+ VOP_UNLOCK(fvp, 0);
error = EPERM;
goto abortit;
}
@@ -835,7 +834,7 @@ abortit:
if ((fcnp->cn_namelen == 1 && fcnp->cn_nameptr[0] == '.') ||
dp == ip || (fcnp->cn_flags | tcnp->cn_flags) & ISDOTDOT ||
(ip->i_flag & IN_RENAME)) {
- VOP_UNLOCK(fvp, 0, td);
+ VOP_UNLOCK(fvp, 0);
error = EINVAL;
goto abortit;
}
@@ -863,7 +862,7 @@ abortit:
ip->i_nlink++;
ip->i_flag |= IN_CHANGE;
if ((error = ext2_update(fvp, 1)) != 0) {
- VOP_UNLOCK(fvp, 0, td);
+ VOP_UNLOCK(fvp, 0);
goto bad;
}
@@ -878,7 +877,7 @@ abortit:
* call to checkpath().
*/
error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_thread);
- VOP_UNLOCK(fvp, 0, td);
+ VOP_UNLOCK(fvp, 0);
if (oldparent != dp->i_number)
newparent = dp->i_number;
if (doingdirectory && newparent) {
@@ -1264,7 +1263,6 @@ ext2_rmdir(ap)
struct vnode *vp = ap->a_vp;
struct vnode *dvp = ap->a_dvp;
struct componentname *cnp = ap->a_cnp;
- struct thread *td = cnp->cn_thread;
struct inode *ip, *dp;
int error;
@@ -1299,7 +1297,7 @@ ext2_rmdir(ap)
dp->i_nlink--;
dp->i_flag |= IN_CHANGE;
cache_purge(dvp);
- VOP_UNLOCK(dvp, 0, td);
+ VOP_UNLOCK(dvp, 0);
/*
* Truncate inode. The only stuff left
* in the directory is "." and "..". The
@@ -1312,7 +1310,8 @@ ext2_rmdir(ap)
* worry about them later.
*/
ip->i_nlink -= 2;
- error = ext2_truncate(vp, (off_t)0, IO_SYNC, cnp->cn_cred, td);
+ error = ext2_truncate(vp, (off_t)0, IO_SYNC, cnp->cn_cred,
+ cnp->cn_thread);
cache_purge(ITOV(ip));
vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
out:
diff --git a/sys/gnu/fs/ext2fs/fs.h b/sys/gnu/fs/ext2fs/fs.h
index 157eacb..d9e7000 100644
--- a/sys/gnu/fs/ext2fs/fs.h
+++ b/sys/gnu/fs/ext2fs/fs.h
@@ -146,7 +146,7 @@ extern u_char *fragtbl[];
*/
#define DEVVP(inode) (VFSTOEXT2(ITOV(inode)->v_mount)->um_devvp)
#define lock_super(devvp) vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY)
-#define unlock_super(devvp) VOP_UNLOCK(devvp, 0, curthread)
+#define unlock_super(devvp) VOP_UNLOCK(devvp, 0)
/*
* Historically, ext2fs kept it's metadata buffers on the LOCKED queue. Now,
diff --git a/sys/gnu/fs/reiserfs/reiserfs_inode.c b/sys/gnu/fs/reiserfs/reiserfs_inode.c
index 3eddd84..90315b0 100644
--- a/sys/gnu/fs/reiserfs/reiserfs_inode.c
+++ b/sys/gnu/fs/reiserfs/reiserfs_inode.c
@@ -804,7 +804,7 @@ reiserfs_iget(
vp->v_vflag |= VV_ROOT;
#if 0
- if (VOP_LOCK(vp, LK_EXCLUSIVE, td) != 0)
+ if (VOP_LOCK(vp, LK_EXCLUSIVE) != 0)
panic("reiserfs/iget: unexpected lock failure");
/*
diff --git a/sys/gnu/fs/reiserfs/reiserfs_namei.c b/sys/gnu/fs/reiserfs/reiserfs_namei.c
index 84a7bf8..61e88f4 100644
--- a/sys/gnu/fs/reiserfs/reiserfs_namei.c
+++ b/sys/gnu/fs/reiserfs/reiserfs_namei.c
@@ -79,7 +79,7 @@ reiserfs_lookup(struct vop_cachedlookup_args *ap)
pdp = vdp;
if (flags & ISDOTDOT) {
saved_ino = (struct cpu_key *)&(de.de_dir_id);
- VOP_UNLOCK(pdp, 0, td);
+ VOP_UNLOCK(pdp, 0);
error = reiserfs_iget(vdp->v_mount,
saved_ino, &vp, td);
vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY);
diff --git a/sys/gnu/fs/reiserfs/reiserfs_vfsops.c b/sys/gnu/fs/reiserfs/reiserfs_vfsops.c
index ee5cb60..8621818 100644
--- a/sys/gnu/fs/reiserfs/reiserfs_vfsops.c
+++ b/sys/gnu/fs/reiserfs/reiserfs_vfsops.c
@@ -449,7 +449,7 @@ reiserfs_mountfs(struct vnode *devvp, struct mount *mp, struct thread *td)
error = vinvalbuf(devvp, V_SAVE, td->td_ucred, td, 0, 0);
if (error) {
- VOP_UNLOCK(devvp, 0, td);
+ VOP_UNLOCK(devvp, 0);
return (error);
}
@@ -458,7 +458,7 @@ reiserfs_mountfs(struct vnode *devvp, struct mount *mp, struct thread *td)
* for now
*/
error = VOP_OPEN(devvp, FREAD, FSCRED, td, NULL);
- VOP_UNLOCK(devvp, 0, td);
+ VOP_UNLOCK(devvp, 0);
if (error)
return (error);
#else
@@ -467,7 +467,7 @@ reiserfs_mountfs(struct vnode *devvp, struct mount *mp, struct thread *td)
error = g_vfs_open(devvp, &cp, "reiserfs", /* read-only */ 0);
g_topology_unlock();
PICKUP_GIANT();
- VOP_UNLOCK(devvp, 0, td);
+ VOP_UNLOCK(devvp, 0);
if (error)
return (error);
diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c b/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c
index 8d3ba0f..244ad30 100644
--- a/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c
+++ b/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c
@@ -302,7 +302,7 @@ _xfs_root(mp, flags, vpp, td)
XVFS_ROOT(MNTTOVFS(mp), &vp, error);
if (error == 0) {
*vpp = vp->v_vnode;
- VOP_LOCK(*vpp, flags, curthread);
+ VOP_LOCK(*vpp, flags);
}
return (error);
}
diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_super.c b/sys/gnu/fs/xfs/FreeBSD/xfs_super.c
index 6f1d8b8..c7968bb 100644
--- a/sys/gnu/fs/xfs/FreeBSD/xfs_super.c
+++ b/sys/gnu/fs/xfs/FreeBSD/xfs_super.c
@@ -105,7 +105,7 @@ xfs_initialize_vnode(
* and unlock the inode.
*/
if (ip->i_d.di_mode != 0 && unlock)
- VOP_UNLOCK(xvp->v_vnode, 0, curthread);
+ VOP_UNLOCK(xvp->v_vnode, 0);
}
#if 0
@@ -189,7 +189,7 @@ xfs_blkdev_get(
vput(devvp);
return (error);
}
- VOP_UNLOCK(devvp, 0, td);
+ VOP_UNLOCK(devvp, 0);
devvp->v_bufobj.bo_private = cp;
devvp->v_bufobj.bo_ops = &xfs_bo_ops;
diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_vnode.c b/sys/gnu/fs/xfs/FreeBSD/xfs_vnode.c
index c014efc..8e2b1f9 100644
--- a/sys/gnu/fs/xfs/FreeBSD/xfs_vnode.c
+++ b/sys/gnu/fs/xfs/FreeBSD/xfs_vnode.c
@@ -139,7 +139,7 @@ vn_purge(struct xfs_vnode *xfs_vp)
if (vp->v_holdcnt == 0)
vhold(vp);
vgone(vp);
- VOP_UNLOCK(vp, 0, curthread);
+ VOP_UNLOCK(vp, 0);
}
void xfs_ichgtime(
diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c b/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c
index 80435a7..90a0b48 100644
--- a/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c
+++ b/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c
@@ -751,7 +751,7 @@ _xfs_create(
if (error == 0) {
*ap->a_vpp = xvp->v_vnode;
- VOP_LOCK(xvp->v_vnode, LK_EXCLUSIVE, td);
+ VOP_LOCK(xvp->v_vnode, LK_EXCLUSIVE);
}
return (error);
@@ -886,7 +886,7 @@ _xfs_symlink(
if (error == 0) {
*ap->a_vpp = xvp->v_vnode;
- VOP_LOCK(xvp->v_vnode, LK_EXCLUSIVE, td);
+ VOP_LOCK(xvp->v_vnode, LK_EXCLUSIVE);
}
return (error);
@@ -922,7 +922,7 @@ _xfs_mknod(
if (error == 0) {
*ap->a_vpp = xvp->v_vnode;
- VOP_LOCK(xvp->v_vnode, LK_EXCLUSIVE, td);
+ VOP_LOCK(xvp->v_vnode, LK_EXCLUSIVE);
}
return (error);
@@ -956,7 +956,7 @@ _xfs_mkdir(
if (error == 0) {
*ap->a_vpp = xvp->v_vnode;
- VOP_LOCK(xvp->v_vnode, LK_EXCLUSIVE, td);
+ VOP_LOCK(xvp->v_vnode, LK_EXCLUSIVE);
}
return (error);
@@ -1322,7 +1322,7 @@ _xfs_cachedlookup(
}
if (flags & ISDOTDOT) {
- VOP_UNLOCK(dvp, 0, td);
+ VOP_UNLOCK(dvp, 0);
error = vn_lock(tvp, cnp->cn_lkflags);
if (error) {
vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
diff --git a/sys/i386/ibcs2/ibcs2_misc.c b/sys/i386/ibcs2/ibcs2_misc.c
index 29ab8a2..18b6459 100644
--- a/sys/i386/ibcs2/ibcs2_misc.c
+++ b/sys/i386/ibcs2/ibcs2_misc.c
@@ -462,7 +462,7 @@ again:
eof:
td->td_retval[0] = uap->nbytes - resid;
out:
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
fdrop(fp, td);
if (cookies)
@@ -628,7 +628,7 @@ again:
eof:
td->td_retval[0] = uap->nbytes - resid;
out:
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
fdrop(fp, td);
if (cookies)
diff --git a/sys/i386/ibcs2/imgact_coff.c b/sys/i386/ibcs2/imgact_coff.c
index d45ddde..348820c 100644
--- a/sys/i386/ibcs2/imgact_coff.c
+++ b/sys/i386/ibcs2/imgact_coff.c
@@ -211,7 +211,7 @@ coff_load_file(struct thread *td, char *name)
* Lose the lock on the vnode. It's no longer needed, and must not
* exist for the pagefault paging to work below.
*/
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if ((error = vm_mmap(kernel_map,
(vm_offset_t *) &ptr,
@@ -285,7 +285,7 @@ coff_load_file(struct thread *td, char *name)
panic("%s vm_map_remove failed", __func__);
fail:
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
unlocked_fail:
NDFREE(&nd, NDF_ONLY_PNBUF);
vrele(nd.ni_vp);
@@ -307,7 +307,6 @@ exec_coff_imgact(imgp)
unsigned long data_offset = 0, data_address = 0, data_size = 0;
unsigned long bss_size = 0;
caddr_t hole;
- struct thread *td = curthread;
if (fhdr->f_magic != I386_COFF ||
!(fhdr->f_flags & F_EXEC)) {
@@ -335,7 +334,7 @@ exec_coff_imgact(imgp)
((const char*)(imgp->image_header) + sizeof(struct filehdr) +
sizeof(struct aouthdr));
- VOP_UNLOCK(imgp->vp, 0, td);
+ VOP_UNLOCK(imgp->vp, 0);
error = exec_new_vmspace(imgp, &ibcs2_svr3_sysvec);
if (error)
diff --git a/sys/i386/linux/imgact_linux.c b/sys/i386/linux/imgact_linux.c
index dd49f9b..2216530 100644
--- a/sys/i386/linux/imgact_linux.c
+++ b/sys/i386/linux/imgact_linux.c
@@ -65,7 +65,6 @@ exec_linux_imgact(struct image_params *imgp)
unsigned long virtual_offset, file_offset;
vm_offset_t buffer;
unsigned long bss_size;
- struct thread *td = curthread;
int error;
if (((a_out->a_magic >> 16) & 0xff) != 0x64)
@@ -114,7 +113,7 @@ exec_linux_imgact(struct image_params *imgp)
}
PROC_UNLOCK(imgp->proc);
- VOP_UNLOCK(imgp->vp, 0, td);
+ VOP_UNLOCK(imgp->vp, 0);
/*
* Destroy old process VM and create a new one (with a new stack)
diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c
index 2a0d7b0..ab8ef08 100644
--- a/sys/kern/imgact_aout.c
+++ b/sys/kern/imgact_aout.c
@@ -192,7 +192,7 @@ exec_aout_imgact(imgp)
* However, in cases where the vnode lock is external, such as nullfs,
* v_usecount may become zero.
*/
- VOP_UNLOCK(imgp->vp, 0, curthread);
+ VOP_UNLOCK(imgp->vp, 0);
/*
* Destroy old process VM and create a new one (with a new stack)
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index 5700189..ff1bcda 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -617,7 +617,6 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp)
const Elf_Note *note, *note_end;
char *path;
const char *note_name;
- struct thread *td = curthread;
struct sysentvec *sv;
/*
@@ -675,7 +674,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp)
* However, in cases where the vnode lock is external, such as nullfs,
* v_usecount may become zero.
*/
- VOP_UNLOCK(imgp->vp, 0, td);
+ VOP_UNLOCK(imgp->vp, 0);
error = exec_new_vmspace(imgp, sv);
imgp->proc->p_sysent = sv;
@@ -803,7 +802,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp)
if (interp != NULL) {
int have_interp = FALSE;
- VOP_UNLOCK(imgp->vp, 0, td);
+ VOP_UNLOCK(imgp->vp, 0);
if (brand_info->emul_path != NULL &&
brand_info->emul_path[0] != '\0') {
path = malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
diff --git a/sys/kern/imgact_gzip.c b/sys/kern/imgact_gzip.c
index 5701894..66f40f6 100644
--- a/sys/kern/imgact_gzip.c
+++ b/sys/kern/imgact_gzip.c
@@ -158,7 +158,6 @@ static int
do_aout_hdr(struct imgact_gzip * gz)
{
int error;
- struct thread *td = curthread;
struct vmspace *vmspace;
vm_offset_t vmaddr;
@@ -234,7 +233,7 @@ do_aout_hdr(struct imgact_gzip * gz)
* However, in cases where the vnode lock is external, such as nullfs,
* v_usecount may become zero.
*/
- VOP_UNLOCK(gz->ip->vp, 0, td);
+ VOP_UNLOCK(gz->ip->vp, 0);
/*
* Destroy old process VM and create a new one (with a new stack)
diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c
index 13c9b70..76d4c75 100644
--- a/sys/kern/kern_acct.c
+++ b/sys/kern/kern_acct.c
@@ -220,13 +220,13 @@ acct(struct thread *td, struct acct_args *uap)
#ifdef MAC
error = mac_system_check_acct(td->td_ucred, nd.ni_vp);
if (error) {
- VOP_UNLOCK(nd.ni_vp, 0, td);
+ VOP_UNLOCK(nd.ni_vp, 0);
vn_close(nd.ni_vp, flags, td->td_ucred, td);
VFS_UNLOCK_GIANT(vfslocked);
return (error);
}
#endif
- VOP_UNLOCK(nd.ni_vp, 0, td);
+ VOP_UNLOCK(nd.ni_vp, 0);
if (nd.ni_vp->v_type != VREG) {
vn_close(nd.ni_vp, flags, td->td_ucred, td);
VFS_UNLOCK_GIANT(vfslocked);
diff --git a/sys/kern/kern_alq.c b/sys/kern/kern_alq.c
index 5ed883c..3f027ab 100644
--- a/sys/kern/kern_alq.c
+++ b/sys/kern/kern_alq.c
@@ -303,7 +303,7 @@ alq_doio(struct alq *alq)
if (mac_vnode_check_write(alq->aq_cred, NOCRED, vp) == 0)
#endif
VOP_WRITE(vp, &auio, IO_UNIT | IO_APPEND, alq->aq_cred);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
VFS_UNLOCK_GIANT(vfslocked);
@@ -363,7 +363,7 @@ alq_open(struct alq **alqp, const char *file, struct ucred *cred, int cmode,
vfslocked = NDHASGIANT(&nd);
NDFREE(&nd, NDF_ONLY_PNBUF);
/* We just unlock so we hold a reference */
- VOP_UNLOCK(nd.ni_vp, 0, td);
+ VOP_UNLOCK(nd.ni_vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
alq = malloc(sizeof(*alq), M_ALD, M_WAITOK|M_ZERO);
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index b68ac30..1e7eee3 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -1185,7 +1185,7 @@ fpathconf(struct thread *td, struct fpathconf_args *uap)
vfslocked = VFS_LOCK_GIANT(vp->v_mount);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_PATHCONF(vp, uap->name, td->td_retval);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
} else if (fp->f_type == DTYPE_PIPE || fp->f_type == DTYPE_SOCKET) {
if (uap->name != _PC_PIPE_BUF) {
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 97eda1d..2f81fcd 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -491,7 +491,7 @@ interpret:
}
/* close files on exec */
- VOP_UNLOCK(imgp->vp, 0, td);
+ VOP_UNLOCK(imgp->vp, 0);
fdcloseexec(td);
vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY);
@@ -591,7 +591,7 @@ interpret:
*/
PROC_UNLOCK(p);
setugidsafety(td);
- VOP_UNLOCK(imgp->vp, 0, td);
+ VOP_UNLOCK(imgp->vp, 0);
error = fdcheckstd(td);
vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY);
if (error != 0)
@@ -725,7 +725,7 @@ done1:
crfree(oldcred);
else
crfree(newcred);
- VOP_UNLOCK(imgp->vp, 0, td);
+ VOP_UNLOCK(imgp->vp, 0);
/*
* Handle deferred decrement of ref counts.
*/
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index af038a2..46bbaa5 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -326,7 +326,7 @@ exit1(struct thread *td, int rv)
sp->s_ttyvp = NULL;
SESS_UNLOCK(p->p_session);
sx_xunlock(&proctree_lock);
- VOP_LOCK(ttyvp, LK_EXCLUSIVE, td);
+ VOP_LOCK(ttyvp, LK_EXCLUSIVE);
VOP_REVOKE(ttyvp, REVOKEALL);
vput(ttyvp);
sx_xlock(&proctree_lock);
diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c
index d77114f..9e7442f 100644
--- a/sys/kern/kern_jail.c
+++ b/sys/kern/kern_jail.c
@@ -148,7 +148,7 @@ jail(struct thread *td, struct jail_args *uap)
goto e_killmtx;
vfslocked = NDHASGIANT(&nd);
pr->pr_root = nd.ni_vp;
- VOP_UNLOCK(nd.ni_vp, 0, td);
+ VOP_UNLOCK(nd.ni_vp, 0);
NDFREE(&nd, NDF_ONLY_PNBUF);
VFS_UNLOCK_GIANT(vfslocked);
error = copyinstr(j.hostname, &pr->pr_host, sizeof(pr->pr_host), 0);
@@ -261,7 +261,7 @@ jail_attach(struct thread *td, struct jail_attach_args *uap)
if ((error = mac_vnode_check_chroot(td->td_ucred, pr->pr_root)))
goto e_unlock;
#endif
- VOP_UNLOCK(pr->pr_root, 0, td);
+ VOP_UNLOCK(pr->pr_root, 0);
change_root(pr->pr_root, td);
VFS_UNLOCK_GIANT(vfslocked);
@@ -276,7 +276,7 @@ jail_attach(struct thread *td, struct jail_attach_args *uap)
crfree(oldcred);
return (0);
e_unlock:
- VOP_UNLOCK(pr->pr_root, 0, td);
+ VOP_UNLOCK(pr->pr_root, 0);
VFS_UNLOCK_GIANT(vfslocked);
mtx_lock(&pr->pr_mtx);
pr->pr_ref--;
diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c
index 00562bc..f5385ea 100644
--- a/sys/kern/kern_ktrace.c
+++ b/sys/kern/kern_ktrace.c
@@ -604,7 +604,7 @@ ktrace(td, uap)
vfslocked = NDHASGIANT(&nd);
NDFREE(&nd, NDF_ONLY_PNBUF);
vp = nd.ni_vp;
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if (vp->v_type != VREG) {
(void) vn_close(vp, FREAD|FWRITE, td->td_ucred, td);
VFS_UNLOCK_GIANT(vfslocked);
@@ -931,7 +931,7 @@ ktr_writerequest(struct thread *td, struct ktr_request *req)
if (error == 0)
#endif
error = VOP_WRITE(vp, &auio, IO_UNIT | IO_APPEND, cred);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
vrele(vp);
VFS_UNLOCK_GIANT(vfslocked);
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c
index 93166a1..2365d0b 100644
--- a/sys/kern/kern_linker.c
+++ b/sys/kern/kern_linker.c
@@ -1632,7 +1632,7 @@ linker_lookup_file(const char *path, int pathlen, const char *name,
type = nd.ni_vp->v_type;
if (vap)
VOP_GETATTR(nd.ni_vp, vap, td->td_ucred, td);
- VOP_UNLOCK(nd.ni_vp, 0, td);
+ VOP_UNLOCK(nd.ni_vp, 0);
vn_close(nd.ni_vp, FREAD, td->td_ucred, td);
VFS_UNLOCK_GIANT(vfslocked);
if (type == VREG)
@@ -1701,7 +1701,7 @@ linker_hints_lookup(const char *path, int pathlen, const char *modname,
UIO_SYSSPACE, IO_NODELOCKED, cred, NOCRED, &reclen, td);
if (error)
goto bad;
- VOP_UNLOCK(nd.ni_vp, 0, td);
+ VOP_UNLOCK(nd.ni_vp, 0);
vn_close(nd.ni_vp, FREAD, cred, td);
VFS_UNLOCK_GIANT(vfslocked);
nd.ni_vp = NULL;
@@ -1770,7 +1770,7 @@ bad:
if (hints)
free(hints, M_TEMP);
if (nd.ni_vp != NULL) {
- VOP_UNLOCK(nd.ni_vp, 0, td);
+ VOP_UNLOCK(nd.ni_vp, 0);
vn_close(nd.ni_vp, FREAD, cred, td);
VFS_UNLOCK_GIANT(vfslocked);
}
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 577bcac..2e81a18 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -3113,12 +3113,12 @@ restart:
/* Don't dump to non-regular files or files with links. */
if (vp->v_type != VREG ||
VOP_GETATTR(vp, &vattr, cred, td) || vattr.va_nlink != 1) {
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
error = EFAULT;
goto close;
}
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
lf.l_whence = SEEK_SET;
lf.l_start = 0;
lf.l_len = 0;
@@ -3144,7 +3144,7 @@ restart:
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
VOP_LEASE(vp, td, cred, LEASE_WRITE);
VOP_SETATTR(vp, &vattr, cred, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
PROC_LOCK(p);
p->p_acflag |= ACORE;
diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c
index 86e69a2..3a959c9 100644
--- a/sys/kern/link_elf.c
+++ b/sys/kern/link_elf.c
@@ -862,7 +862,7 @@ out:
free(shdr, M_LINKER);
if (firstpage)
free(firstpage, M_LINKER);
- VOP_UNLOCK(nd.ni_vp, 0, td);
+ VOP_UNLOCK(nd.ni_vp, 0);
vn_close(nd.ni_vp, FREAD, td->td_ucred, td);
VFS_UNLOCK_GIANT(vfslocked);
diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c
index 1798253..6bc62f7 100644
--- a/sys/kern/link_elf_obj.c
+++ b/sys/kern/link_elf_obj.c
@@ -788,7 +788,7 @@ out:
linker_file_unload(lf, LINKER_UNLOAD_FORCE);
if (hdr)
free(hdr, M_LINKER);
- VOP_UNLOCK(nd.ni_vp, 0, td);
+ VOP_UNLOCK(nd.ni_vp, 0);
vn_close(nd.ni_vp, FREAD, td->td_ucred, td);
VFS_UNLOCK_GIANT(vfslocked);
diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c
index 4feb565..3405aa7 100644
--- a/sys/kern/tty_cons.c
+++ b/sys/kern/tty_cons.c
@@ -405,7 +405,7 @@ cn_devopen(struct cn_device *cnd, struct thread *td, int forceopen)
error = vn_open(&nd, &openflag, 0, NULL);
if (error == 0) {
NDFREE(&nd, NDF_ONLY_PNBUF);
- VOP_UNLOCK(nd.ni_vp, 0, td);
+ VOP_UNLOCK(nd.ni_vp, 0);
if (nd.ni_vp->v_type == VCHR)
cnd->cnd_vp = nd.ni_vp;
else
diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c
index 4cfa21d..0e6be8f 100644
--- a/sys/kern/uipc_mqueue.c
+++ b/sys/kern/uipc_mqueue.c
@@ -819,7 +819,7 @@ mqfs_lookupx(struct vop_cachedlookup_args *ap)
return (EIO);
if ((flags & ISLASTCN) && nameiop != LOOKUP)
return (EINVAL);
- VOP_UNLOCK(dvp, 0, cnp->cn_thread);
+ VOP_UNLOCK(dvp, 0);
KASSERT(pd->mn_parent, ("non-root directory has no parent"));
pn = pd->mn_parent;
error = mqfs_allocv(dvp->v_mount, vpp, pn);
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index 2eb5087..acda9ae 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -1794,7 +1794,7 @@ kern_sendfile(struct thread *td, struct sendfile_args *uap,
obj = NULL;
}
}
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
if (obj == NULL) {
error = EINVAL;
@@ -2036,7 +2036,7 @@ retry_space:
trunc_page(off), UIO_NOCOPY, IO_NODELOCKED |
IO_VMIO | ((MAXBSIZE / bsize) << IO_SEQSHIFT),
td->td_ucred, NOCRED, &resid, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
VM_OBJECT_LOCK(obj);
vm_page_io_finish(pg);
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index d6460a4..d60b270 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -474,7 +474,7 @@ restart:
unp->unp_flags &= ~UNP_BINDING;
UNP_PCB_UNLOCK(unp);
UNP_GLOBAL_WUNLOCK();
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
VFS_UNLOCK_GIANT(vfslocked);
free(buf, M_TEMP);
diff --git a/sys/kern/vfs_acl.c b/sys/kern/vfs_acl.c
index 0afe7ac..6701864 100644
--- a/sys/kern/vfs_acl.c
+++ b/sys/kern/vfs_acl.c
@@ -101,7 +101,7 @@ vacl_set_acl(struct thread *td, struct vnode *vp, acl_type_t type,
#ifdef MAC
out:
#endif
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
return(error);
}
@@ -127,7 +127,7 @@ vacl_get_acl(struct thread *td, struct vnode *vp, acl_type_t type,
#ifdef MAC
out:
#endif
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if (error == 0)
error = copyout(&inkernelacl, aclp, sizeof(struct acl));
return (error);
@@ -156,7 +156,7 @@ vacl_delete(struct thread *td, struct vnode *vp, acl_type_t type)
#ifdef MAC
out:
#endif
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
return (error);
}
diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c
index ce5fd58..e958d54 100644
--- a/sys/kern/vfs_aio.c
+++ b/sys/kern/vfs_aio.c
@@ -772,7 +772,7 @@ aio_fsync_vnode(struct thread *td, struct vnode *vp)
}
error = VOP_FSYNC(vp, MNT_WAIT, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
drop:
VFS_UNLOCK_GIANT(vfslocked);
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index e799d8d..e0f395a 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -2136,7 +2136,6 @@ SYSCTL_INT(_vfs, OID_AUTO, flushwithdeps, CTLFLAG_RW, &flushwithdeps,
static int
flushbufqueues(int queue, int flushdeps)
{
- struct thread *td = curthread;
struct buf sentinel;
struct vnode *vp;
struct mount *mp;
@@ -2212,7 +2211,7 @@ flushbufqueues(int queue, int flushdeps)
bp, bp->b_vp, bp->b_flags);
vfs_bio_awrite(bp);
vn_finished_write(mp);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
flushwithdeps += hasdeps;
flushed++;
waitrunningbufspace();
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index 432e948..b115b08 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -435,7 +435,7 @@ success:
ltype = 0; /* silence gcc warning */
if (cnp->cn_flags & ISDOTDOT) {
ltype = VOP_ISLOCKED(dvp, td);
- VOP_UNLOCK(dvp, 0, td);
+ VOP_UNLOCK(dvp, 0);
}
VI_LOCK(*vpp);
CACHE_UNLOCK();
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
index 171ac20..26d5640 100644
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -263,7 +263,8 @@ vop_stdlock(ap)
{
struct vnode *vp = ap->a_vp;
- return (_lockmgr(vp->v_vnlock, ap->a_flags, VI_MTX(vp), ap->a_td, ap->a_file, ap->a_line));
+ return (_lockmgr(vp->v_vnlock, ap->a_flags, VI_MTX(vp), curthread,
+ ap->a_file, ap->a_line));
}
/* See above. */
@@ -278,7 +279,7 @@ vop_stdunlock(ap)
struct vnode *vp = ap->a_vp;
return (lockmgr(vp->v_vnlock, ap->a_flags | LK_RELEASE, VI_MTX(vp),
- ap->a_td));
+ curthread));
}
/* See above. */
@@ -594,7 +595,7 @@ loop:
allerror = error;
/* Do not turn this into vput. td is not always curthread. */
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vrele(vp);
MNT_ILOCK(mp);
}
@@ -660,7 +661,7 @@ vfs_stdextattrctl(mp, cmd, filename_vp, attrnamespace, attrname, td)
{
if (filename_vp != NULL)
- VOP_UNLOCK(filename_vp, 0, td);
+ VOP_UNLOCK(filename_vp, 0);
return (EOPNOTSUPP);
}
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c
index e73f312..28f3741 100644
--- a/sys/kern/vfs_extattr.c
+++ b/sys/kern/vfs_extattr.c
@@ -192,7 +192,7 @@ extattr_set_vp(struct vnode *vp, int attrnamespace, const char *attrname,
td->td_retval[0] = cnt;
done:
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
return (error);
}
@@ -374,7 +374,7 @@ extattr_get_vp(struct vnode *vp, int attrnamespace, const char *attrname,
td->td_retval[0] = size;
done:
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
return (error);
}
@@ -526,7 +526,7 @@ extattr_delete_vp(struct vnode *vp, int attrnamespace, const char *attrname,
#ifdef MAC
done:
#endif
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
return (error);
}
@@ -691,7 +691,7 @@ extattr_list_vp(struct vnode *vp, int attrnamespace, void *data,
td->td_retval[0] = size;
done:
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
return (error);
}
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c
index 55c496a..1e0a8be 100644
--- a/sys/kern/vfs_lookup.c
+++ b/sys/kern/vfs_lookup.c
@@ -495,7 +495,7 @@ dirloop:
AUDIT_ARG(vnode, dp, ARG_VNODE2);
if (!(cnp->cn_flags & (LOCKPARENT | LOCKLEAF)))
- VOP_UNLOCK(dp, 0, td);
+ VOP_UNLOCK(dp, 0);
/* XXX This should probably move to the top of function. */
if (cnp->cn_flags & SAVESTART)
panic("lookup: SAVESTART");
@@ -626,7 +626,7 @@ unionlookup:
goto bad;
}
if ((cnp->cn_flags & LOCKPARENT) == 0)
- VOP_UNLOCK(dp, 0, td);
+ VOP_UNLOCK(dp, 0);
/*
* This is a temporary assert to make sure I know what the
* behavior here was.
@@ -713,7 +713,7 @@ unionlookup:
* Symlink code always expects an unlocked dvp.
*/
if (ndp->ni_dvp != ndp->ni_vp)
- VOP_UNLOCK(ndp->ni_dvp, 0, td);
+ VOP_UNLOCK(ndp->ni_dvp, 0);
goto success;
}
@@ -767,7 +767,7 @@ nextname:
VFS_UNLOCK_GIANT(dvfslocked);
dvfslocked = 0;
} else if ((cnp->cn_flags & LOCKPARENT) == 0 && ndp->ni_dvp != dp)
- VOP_UNLOCK(ndp->ni_dvp, 0, td);
+ VOP_UNLOCK(ndp->ni_dvp, 0);
if (cnp->cn_flags & AUDITVNODE1)
AUDIT_ARG(vnode, dp, ARG_VNODE1);
@@ -775,7 +775,7 @@ nextname:
AUDIT_ARG(vnode, dp, ARG_VNODE2);
if ((cnp->cn_flags & LOCKLEAF) == 0)
- VOP_UNLOCK(dp, 0, td);
+ VOP_UNLOCK(dp, 0);
success:
/*
* Because of lookup_shared we may have the vnode shared locked, but
@@ -813,7 +813,6 @@ bad:
int
relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp)
{
- struct thread *td = cnp->cn_thread;
struct vnode *dp = 0; /* the directory we are searching */
int wantparent; /* 1 => wantparent or lockparent flag */
int rdonly; /* lookup read-only flag bit */
@@ -859,7 +858,7 @@ relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp)
goto bad;
}
if (!(cnp->cn_flags & LOCKLEAF))
- VOP_UNLOCK(dp, 0, td);
+ VOP_UNLOCK(dp, 0);
*vpp = dp;
/* XXX This should probably move to the top of function. */
if (cnp->cn_flags & SAVESTART)
@@ -892,7 +891,7 @@ relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp)
if (cnp->cn_flags & SAVESTART)
VREF(dvp);
if ((cnp->cn_flags & LOCKPARENT) == 0)
- VOP_UNLOCK(dp, 0, td);
+ VOP_UNLOCK(dp, 0);
/*
* This is a temporary assert to make sure I know what the
* behavior here was.
@@ -926,7 +925,7 @@ relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp)
*/
if ((cnp->cn_flags & LOCKPARENT) == 0 && dvp != dp) {
if (wantparent)
- VOP_UNLOCK(dvp, 0, td);
+ VOP_UNLOCK(dvp, 0);
else
vput(dvp);
} else if (!wantparent)
@@ -942,7 +941,7 @@ relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp)
VREF(dvp);
if ((cnp->cn_flags & LOCKLEAF) == 0)
- VOP_UNLOCK(dp, 0, td);
+ VOP_UNLOCK(dp, 0);
return (0);
bad:
vput(dp);
@@ -979,7 +978,7 @@ NDFREE(struct nameidata *ndp, const u_int flags)
ndp->ni_vp = NULL;
}
if (unlock_vp)
- VOP_UNLOCK(ndp->ni_vp, 0, ndp->ni_cnd.cn_thread);
+ VOP_UNLOCK(ndp->ni_vp, 0);
if (!(flags & NDF_NO_DVP_UNLOCK) &&
(ndp->ni_cnd.cn_flags & LOCKPARENT) &&
ndp->ni_dvp != ndp->ni_vp)
@@ -994,7 +993,7 @@ NDFREE(struct nameidata *ndp, const u_int flags)
ndp->ni_dvp = NULL;
}
if (unlock_dvp)
- VOP_UNLOCK(ndp->ni_dvp, 0, ndp->ni_cnd.cn_thread);
+ VOP_UNLOCK(ndp->ni_dvp, 0);
if (!(flags & NDF_NO_STARTDIR_RELE) &&
(ndp->ni_cnd.cn_flags & SAVESTART)) {
vrele(ndp->ni_startdir);
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 43b0cb0..5100f73 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -939,7 +939,7 @@ vfs_domount(
mp->mnt_flag |= fsflags &
(MNT_RELOAD | MNT_FORCE | MNT_UPDATE | MNT_SNAPSHOT | MNT_ROOTFS);
MNT_IUNLOCK(mp);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
mp->mnt_optnew = fsdata;
vfs_mergeopts(mp->mnt_optnew, mp->mnt_opt);
} else {
@@ -983,7 +983,7 @@ vfs_domount(
* Allocate and initialize the filesystem.
*/
mp = vfs_mount_alloc(vp, vfsp, fspath, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
/* XXXMAC: pass to vfs_mount_alloc? */
mp->mnt_optnew = fsdata;
@@ -1081,7 +1081,7 @@ vfs_domount(
panic("mount: lost mount");
mountcheckdirs(vp, newdp);
vput(newdp);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if ((mp->mnt_flag & MNT_RDONLY) == 0)
error = vfs_allocate_syncvnode(mp);
vfs_unbusy(mp, td);
@@ -1212,7 +1212,7 @@ dounmount(mp, flags, td)
*/
if (coveredvp->v_mountedhere != mp ||
coveredvp->v_mountedhere->mnt_gen != mnt_gen_r) {
- VOP_UNLOCK(coveredvp, 0, td);
+ VOP_UNLOCK(coveredvp, 0);
return (EBUSY);
}
}
@@ -1223,7 +1223,7 @@ dounmount(mp, flags, td)
error = vfs_suser(mp, td);
if (error) {
if (coveredvp)
- VOP_UNLOCK(coveredvp, 0, td);
+ VOP_UNLOCK(coveredvp, 0);
return (error);
}
@@ -1231,7 +1231,7 @@ dounmount(mp, flags, td)
if (mp->mnt_kern_flag & MNTK_UNMOUNT) {
MNT_IUNLOCK(mp);
if (coveredvp)
- VOP_UNLOCK(coveredvp, 0, td);
+ VOP_UNLOCK(coveredvp, 0);
return (EBUSY);
}
mp->mnt_kern_flag |= MNTK_UNMOUNT | MNTK_NOINSMNTQ;
@@ -1248,7 +1248,7 @@ dounmount(mp, flags, td)
wakeup(mp);
MNT_IUNLOCK(mp);
if (coveredvp)
- VOP_UNLOCK(coveredvp, 0, td);
+ VOP_UNLOCK(coveredvp, 0);
return (error);
}
vn_start_write(NULL, &mp, V_WAIT);
@@ -1319,7 +1319,7 @@ dounmount(mp, flags, td)
wakeup(mp);
MNT_IUNLOCK(mp);
if (coveredvp)
- VOP_UNLOCK(coveredvp, 0, td);
+ VOP_UNLOCK(coveredvp, 0);
return (error);
}
mtx_lock(&mountlist_mtx);
@@ -1479,7 +1479,7 @@ set_rootvnode(struct thread *td)
FILEDESC_SUNLOCK(p->p_fd);
- VOP_UNLOCK(rootvnode, 0, td);
+ VOP_UNLOCK(rootvnode, 0);
}
/*
@@ -1574,7 +1574,7 @@ devfs_fixup(struct thread *td)
mtx_lock(&mountlist_mtx);
TAILQ_INSERT_TAIL(&mountlist, mp, mnt_list);
mtx_unlock(&mountlist_mtx);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vput(dvp);
vfs_unbusy(mp, td);
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index ecaa158..953c1d8 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -610,7 +610,7 @@ vlrureclaim(struct mount *mp)
}
MNT_IUNLOCK(mp);
vholdl(vp);
- if (VOP_LOCK(vp, LK_INTERLOCK|LK_EXCLUSIVE|LK_NOWAIT, td)) {
+ if (VOP_LOCK(vp, LK_INTERLOCK|LK_EXCLUSIVE|LK_NOWAIT)) {
vdrop(vp);
goto next_iter_mntunlocked;
}
@@ -630,13 +630,13 @@ vlrureclaim(struct mount *mp)
if (vp->v_usecount || !LIST_EMPTY(&(vp)->v_cache_src) ||
(vp->v_object != NULL &&
vp->v_object->resident_page_count > trigger)) {
- VOP_UNLOCK(vp, LK_INTERLOCK, td);
+ VOP_UNLOCK(vp, LK_INTERLOCK);
goto next_iter_mntunlocked;
}
KASSERT((vp->v_iflag & VI_DOOMED) == 0,
("VI_DOOMED unexpectedly detected in vlrureclaim()"));
vgonel(vp);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vdropl(vp);
done++;
next_iter_mntunlocked:
@@ -836,7 +836,6 @@ vdestroy(struct vnode *vp)
static int
vtryrecycle(struct vnode *vp)
{
- struct thread *td = curthread;
struct mount *vnmp;
CTR1(KTR_VFS, "vtryrecycle: trying vp %p", vp);
@@ -846,13 +845,13 @@ vtryrecycle(struct vnode *vp)
* This vnode may found and locked via some other list, if so we
* can't recycle it yet.
*/
- if (VOP_LOCK(vp, LK_EXCLUSIVE | LK_NOWAIT, td) != 0)
+ if (VOP_LOCK(vp, LK_EXCLUSIVE | LK_NOWAIT) != 0)
return (EWOULDBLOCK);
/*
* Don't recycle if its filesystem is being suspended.
*/
if (vn_start_write(vp, &vnmp, V_NOWAIT) != 0) {
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
return (EBUSY);
}
/*
@@ -863,13 +862,13 @@ vtryrecycle(struct vnode *vp)
*/
VI_LOCK(vp);
if (vp->v_usecount) {
- VOP_UNLOCK(vp, LK_INTERLOCK, td);
+ VOP_UNLOCK(vp, LK_INTERLOCK);
vn_finished_write(vnmp);
return (EBUSY);
}
if ((vp->v_iflag & VI_DOOMED) == 0)
vgonel(vp);
- VOP_UNLOCK(vp, LK_INTERLOCK, td);
+ VOP_UNLOCK(vp, LK_INTERLOCK);
vn_finished_write(vnmp);
CTR1(KTR_VFS, "vtryrecycle: recycled vp %p", vp);
return (0);
@@ -1664,7 +1663,7 @@ restart:
}
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
(void) VOP_FSYNC(vp, MNT_LAZY, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
VI_LOCK(vp);
if (((*bo)->bo_flag & BO_ONWORKLST) != 0) {
@@ -2073,7 +2072,7 @@ vget(struct vnode *vp, int flags, struct thread *td)
vinactive(vp, td);
VI_UNLOCK(vp);
if ((oldflags & LK_TYPE_MASK) == 0)
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
} else
VI_UNLOCK(vp);
return (0);
@@ -2160,7 +2159,7 @@ vrele(struct vnode *vp)
vp->v_iflag &= ~VI_OWEINACT;
if (vp->v_iflag & VI_OWEINACT)
vinactive(vp, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
} else {
VI_LOCK(vp);
if (vp->v_usecount > 0)
@@ -2191,7 +2190,7 @@ vput(struct vnode *vp)
if (vp->v_usecount > 1 || ((vp->v_iflag & VI_DOINGINACT) &&
vp->v_usecount == 1)) {
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
v_decr_usecount(vp);
return;
}
@@ -2210,7 +2209,7 @@ vput(struct vnode *vp)
v_decr_useonly(vp);
vp->v_iflag |= VI_OWEINACT;
if (VOP_ISLOCKED(vp, NULL) != LK_EXCLUSIVE) {
- error = VOP_LOCK(vp, LK_UPGRADE|LK_INTERLOCK|LK_NOWAIT, td);
+ error = VOP_LOCK(vp, LK_UPGRADE|LK_INTERLOCK|LK_NOWAIT);
VI_LOCK(vp);
if (error) {
if (vp->v_usecount > 0)
@@ -2222,7 +2221,7 @@ vput(struct vnode *vp)
vp->v_iflag &= ~VI_OWEINACT;
if (vp->v_iflag & VI_OWEINACT)
vinactive(vp, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
done:
vdropl(vp);
}
@@ -2370,7 +2369,7 @@ loop:
* Skip over a vnodes marked VV_SYSTEM.
*/
if ((flags & SKIPSYSTEM) && (vp->v_vflag & VV_SYSTEM)) {
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vdrop(vp);
MNT_ILOCK(mp);
continue;
@@ -2387,7 +2386,7 @@ loop:
if ((vp->v_type == VNON ||
(error == 0 && vattr.va_nlink > 0)) &&
(vp->v_writecount == 0 || vp->v_type != VREG)) {
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vdropl(vp);
MNT_ILOCK(mp);
continue;
@@ -2412,7 +2411,7 @@ loop:
vprint("vflush: busy vnode", vp);
#endif
}
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vdropl(vp);
MNT_ILOCK(mp);
}
@@ -2428,9 +2427,9 @@ loop:
("vflush: usecount %d < rootrefs %d",
rootvp->v_usecount, rootrefs));
if (busy == 1 && rootvp->v_usecount == rootrefs) {
- VOP_LOCK(rootvp, LK_EXCLUSIVE|LK_INTERLOCK, td);
+ VOP_LOCK(rootvp, LK_EXCLUSIVE|LK_INTERLOCK);
vgone(rootvp);
- VOP_UNLOCK(rootvp, 0, td);
+ VOP_UNLOCK(rootvp, 0);
busy = 0;
} else
VI_UNLOCK(rootvp);
@@ -3877,7 +3876,7 @@ vfs_knlunlock(void *arg)
{
struct vnode *vp = arg;
- VOP_UNLOCK(vp, 0, curthread);
+ VOP_UNLOCK(vp, 0);
}
static int
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 0ac4316..3bb6243 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -371,7 +371,7 @@ kern_fstatfs(struct thread *td, int fd, struct statfs *buf)
mp = vp->v_mount;
if (mp)
vfs_ref(mp);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
fdrop(fp, td);
if (vp->v_iflag & VI_DOOMED) {
error = EBADF;
@@ -756,7 +756,7 @@ fchdir(td, uap)
VFS_UNLOCK_GIANT(vfslocked);
return (error);
}
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
FILEDESC_XLOCK(fdp);
vpold = fdp->fd_cdir;
@@ -807,7 +807,7 @@ kern_chdir(struct thread *td, char *path, enum uio_seg pathseg)
NDFREE(&nd, NDF_ONLY_PNBUF);
return (error);
}
- VOP_UNLOCK(nd.ni_vp, 0, td);
+ VOP_UNLOCK(nd.ni_vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
NDFREE(&nd, NDF_ONLY_PNBUF);
FILEDESC_XLOCK(fdp);
@@ -894,7 +894,7 @@ chroot(td, uap)
if ((error = mac_vnode_check_chroot(td->td_ucred, nd.ni_vp)))
goto e_vunlock;
#endif
- VOP_UNLOCK(nd.ni_vp, 0, td);
+ VOP_UNLOCK(nd.ni_vp, 0);
error = change_root(nd.ni_vp, td);
vrele(nd.ni_vp);
VFS_UNLOCK_GIANT(vfslocked);
@@ -1080,7 +1080,7 @@ kern_open(struct thread *td, char *path, enum uio_seg pathseg, int flags,
finit(fp, flags & FMASK, DTYPE_VNODE, vp, &vnops);
}
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if (flags & (O_EXLOCK | O_SHLOCK)) {
lf.l_whence = SEEK_SET;
lf.l_start = 0;
@@ -1109,7 +1109,7 @@ kern_open(struct thread *td, char *path, enum uio_seg pathseg, int flags,
if (error == 0)
#endif
error = VOP_SETATTR(vp, &vat, td->td_ucred, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
if (error)
goto bad;
@@ -1474,7 +1474,7 @@ kern_link(struct thread *td, char *path, char *link, enum uio_seg segflg)
if (error == 0)
#endif
error = VOP_LINK(nd.ni_dvp, vp, &nd.ni_cnd);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vput(nd.ni_dvp);
}
NDFREE(&nd, NDF_ONLY_PNBUF);
@@ -1769,7 +1769,7 @@ lseek(td, uap)
case L_XTND:
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_GETATTR(vp, &vattr, cred, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if (error)
break;
if (noneg &&
@@ -2406,7 +2406,7 @@ setfflags(td, vp, flags)
if (error == 0)
#endif
error = VOP_SETATTR(vp, &vattr, td->td_ucred, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
return (error);
}
@@ -2502,7 +2502,7 @@ fchflags(td, uap)
#ifdef AUDIT
vn_lock(fp->f_vnode, LK_EXCLUSIVE | LK_RETRY);
AUDIT_ARG(vnode, fp->f_vnode, ARG_VNODE1);
- VOP_UNLOCK(fp->f_vnode, 0, td);
+ VOP_UNLOCK(fp->f_vnode, 0);
#endif
error = setfflags(td, fp->f_vnode, uap->flags);
VFS_UNLOCK_GIANT(vfslocked);
@@ -2534,7 +2534,7 @@ setfmode(td, vp, mode)
if (error == 0)
#endif
error = VOP_SETATTR(vp, &vattr, td->td_ucred, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
return (error);
}
@@ -2642,7 +2642,7 @@ fchmod(td, uap)
#ifdef AUDIT
vn_lock(fp->f_vnode, LK_EXCLUSIVE | LK_RETRY);
AUDIT_ARG(vnode, fp->f_vnode, ARG_VNODE1);
- VOP_UNLOCK(fp->f_vnode, 0, td);
+ VOP_UNLOCK(fp->f_vnode, 0);
#endif
error = setfmode(td, fp->f_vnode, uap->mode);
VFS_UNLOCK_GIANT(vfslocked);
@@ -2677,7 +2677,7 @@ setfown(td, vp, uid, gid)
if (error == 0)
#endif
error = VOP_SETATTR(vp, &vattr, td->td_ucred, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
return (error);
}
@@ -2799,7 +2799,7 @@ fchown(td, uap)
#ifdef AUDIT
vn_lock(fp->f_vnode, LK_EXCLUSIVE | LK_RETRY);
AUDIT_ARG(vnode, fp->f_vnode, ARG_VNODE1);
- VOP_UNLOCK(fp->f_vnode, 0, td);
+ VOP_UNLOCK(fp->f_vnode, 0);
#endif
error = setfown(td, fp->f_vnode, uap->uid, uap->gid);
VFS_UNLOCK_GIANT(vfslocked);
@@ -2880,7 +2880,7 @@ setutimes(td, vp, ts, numtimes, nullflag)
#endif
if (error == 0)
error = VOP_SETATTR(vp, &vattr, td->td_ucred, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
return (error);
}
@@ -3012,7 +3012,7 @@ kern_futimes(struct thread *td, int fd, struct timeval *tptr,
#ifdef AUDIT
vn_lock(fp->f_vnode, LK_EXCLUSIVE | LK_RETRY);
AUDIT_ARG(vnode, fp->f_vnode, ARG_VNODE1);
- VOP_UNLOCK(fp->f_vnode, 0, td);
+ VOP_UNLOCK(fp->f_vnode, 0);
#endif
error = setutimes(td, fp->f_vnode, ts, 2, tptr == NULL);
VFS_UNLOCK_GIANT(vfslocked);
@@ -3174,7 +3174,7 @@ fsync(td, uap)
}
error = VOP_FSYNC(vp, MNT_WAIT, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
drop:
VFS_UNLOCK_GIANT(vfslocked);
@@ -3229,9 +3229,9 @@ kern_rename(struct thread *td, char *from, char *to, enum uio_seg pathseg)
#ifdef MAC
error = mac_vnode_check_rename_from(td->td_ucred, fromnd.ni_dvp,
fromnd.ni_vp, &fromnd.ni_cnd);
- VOP_UNLOCK(fromnd.ni_dvp, 0, td);
+ VOP_UNLOCK(fromnd.ni_dvp, 0);
if (fromnd.ni_dvp != fromnd.ni_vp)
- VOP_UNLOCK(fromnd.ni_vp, 0, td);
+ VOP_UNLOCK(fromnd.ni_vp, 0);
#endif
fvp = fromnd.ni_vp;
if (error == 0)
@@ -3555,7 +3555,7 @@ unionread:
#ifdef MAC
error = mac_vnode_check_readdir(td->td_ucred, vp);
if (error) {
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
fdrop(fp, td);
return (error);
@@ -3613,7 +3613,7 @@ unionread:
FREE(dirbuf, M_TEMP);
}
if (error) {
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
fdrop(fp, td);
return (error);
@@ -3631,7 +3631,7 @@ unionread:
VFS_UNLOCK_GIANT(vfslocked);
goto unionread;
}
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
error = copyout(&loff, uap->basep, sizeof(long));
fdrop(fp, td);
@@ -3704,7 +3704,7 @@ unionread:
NULL);
fp->f_offset = auio.uio_offset;
if (error) {
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
goto fail;
}
@@ -3721,7 +3721,7 @@ unionread:
VFS_UNLOCK_GIANT(vfslocked);
goto unionread;
}
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
if (uap->basep != NULL) {
error = copyout(&loff, uap->basep, sizeof(long));
@@ -4048,7 +4048,7 @@ fhopen(td, uap)
goto bad;
}
if (fmode & O_TRUNC) {
- VOP_UNLOCK(vp, 0, td); /* XXX */
+ VOP_UNLOCK(vp, 0); /* XXX */
if ((error = vn_start_write(NULL, &mp, V_WAIT | PCATCH)) != 0) {
vrele(vp);
goto out;
@@ -4104,7 +4104,7 @@ fhopen(td, uap)
type = F_FLOCK;
if ((fmode & FNONBLOCK) == 0)
type |= F_WAIT;
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if ((error = VOP_ADVLOCK(vp, (caddr_t)fp, F_SETLK, &lf,
type)) != 0) {
/*
@@ -4124,7 +4124,7 @@ fhopen(td, uap)
atomic_set_int(&fp->f_flag, FHASLOCK);
}
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
fdrop(fp, td);
vfs_rel(mp);
VFS_UNLOCK_GIANT(vfslocked);
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 181cea1..3102c02 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -421,7 +421,7 @@ vn_rdwr(rw, vp, base, len, offset, segflg, ioflg, active_cred, file_cred,
if ((ioflg & IO_NODELOCKED) == 0) {
if (rw == UIO_WRITE && vp->v_type != VCHR)
vn_finished_write(mp);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
}
return (error);
}
@@ -546,7 +546,7 @@ vn_read(fp, uio, active_cred, flags, td)
mtx_unlock(mtxp);
}
fp->f_nextoff = uio->uio_offset;
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
return (error);
}
@@ -600,7 +600,7 @@ vn_write(fp, uio, active_cred, flags, td)
if ((flags & FOF_OFFSET) == 0)
fp->f_offset = uio->uio_offset;
fp->f_nextoff = uio->uio_offset;
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if (vp->v_type != VCHR)
vn_finished_write(mp);
unlock:
@@ -649,7 +649,7 @@ vn_truncate(fp, length, active_cred, td)
error = VOP_SETATTR(vp, &vattr, fp->f_cred, td);
}
out:
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
VFS_UNLOCK_GIANT(vfslocked);
return (error);
@@ -672,7 +672,7 @@ vn_statfile(fp, sb, active_cred, td)
vfslocked = VFS_LOCK_GIANT(vp->v_mount);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = vn_stat(vp, sb, active_cred, fp->f_cred, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
return (error);
@@ -807,7 +807,7 @@ vn_ioctl(fp, com, data, active_cred, td)
if (com == FIONREAD) {
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_GETATTR(vp, &vattr, active_cred, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if (!error)
*(int *)data = vattr.va_size - fp->f_offset;
}
@@ -844,7 +844,7 @@ vn_poll(fp, events, active_cred, td)
#ifdef MAC
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = mac_vnode_check_poll(active_cred, fp->f_cred, vp);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if (!error)
#endif
@@ -881,8 +881,7 @@ _vn_lock(struct vnode *vp, int flags, char *file, int line)
* lockmgr drops interlock before it will return for
* any reason. So force the code above to relock it.
*/
- error = VOP_LOCK1(vp, flags | LK_INTERLOCK, curthread, file,
- line);
+ error = VOP_LOCK1(vp, flags | LK_INTERLOCK, file, line);
flags &= ~LK_INTERLOCK;
KASSERT((flags & LK_RETRY) == 0 || error == 0,
("LK_RETRY set with incompatible flags %d\n", flags));
@@ -892,7 +891,7 @@ _vn_lock(struct vnode *vp, int flags, char *file, int line)
*/
if (error == 0 && vp->v_iflag & VI_DOOMED &&
(flags & LK_RETRY) == 0) {
- VOP_UNLOCK(vp, 0, curthread);
+ VOP_UNLOCK(vp, 0);
error = ENOENT;
break;
}
@@ -1232,7 +1231,7 @@ vn_extattr_get(struct vnode *vp, int ioflg, int attrnamespace,
td);
if ((ioflg & IO_NODELOCKED) == 0)
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if (error == 0) {
*buflen = *buflen - auio.uio_resid;
@@ -1277,7 +1276,7 @@ vn_extattr_set(struct vnode *vp, int ioflg, int attrnamespace,
if ((ioflg & IO_NODELOCKED) == 0) {
vn_finished_write(mp);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
}
return (error);
@@ -1306,7 +1305,7 @@ vn_extattr_rm(struct vnode *vp, int ioflg, int attrnamespace,
if ((ioflg & IO_NODELOCKED) == 0) {
vn_finished_write(mp);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
}
return (error);
diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src
index 6bd98aa..5c69255 100644
--- a/sys/kern/vnode_if.src
+++ b/sys/kern/vnode_if.src
@@ -368,7 +368,6 @@ vop_reclaim {
vop_lock1 {
IN struct vnode *vp;
IN int flags;
- IN struct thread *td;
IN char *file;
IN int line;
};
@@ -380,7 +379,6 @@ vop_lock1 {
vop_unlock {
IN struct vnode *vp;
IN int flags;
- IN struct thread *td;
};
diff --git a/sys/nfs4client/nfs4_vfsops.c b/sys/nfs4client/nfs4_vfsops.c
index fb61220..3efc077 100644
--- a/sys/nfs4client/nfs4_vfsops.c
+++ b/sys/nfs4client/nfs4_vfsops.c
@@ -764,7 +764,7 @@ loop:
error = VOP_FSYNC(vp, waitfor, td);
if (error)
allerror = error;
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vrele(vp);
MNT_ILOCK(mp);
diff --git a/sys/nfs4client/nfs4_vnops.c b/sys/nfs4client/nfs4_vnops.c
index b631c77..7cc0fa6 100644
--- a/sys/nfs4client/nfs4_vnops.c
+++ b/sys/nfs4client/nfs4_vnops.c
@@ -1045,7 +1045,7 @@ nfs4_lookup(struct vop_lookup_args *ap)
}
if (flags & ISDOTDOT) {
- VOP_UNLOCK(dvp, 0, td);
+ VOP_UNLOCK(dvp, 0);
error = nfs_nget(dvp->v_mount, fhp, fhsize, &np, LK_EXCLUSIVE);
vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
@@ -1721,7 +1721,7 @@ nfs4_rename(struct vop_rename_args *ap)
* often.
*/
VOP_FSYNC(fvp, MNT_WAIT, fcnp->cn_thread);
- VOP_UNLOCK(fvp, 0, fcnp->cn_thread);
+ VOP_UNLOCK(fvp, 0);
if (tvp)
VOP_FSYNC(tvp, MNT_WAIT, tcnp->cn_thread);
diff --git a/sys/nfsclient/nfs_subs.c b/sys/nfsclient/nfs_subs.c
index d6c7d29..4bbf0b0 100644
--- a/sys/nfsclient/nfs_subs.c
+++ b/sys/nfsclient/nfs_subs.c
@@ -503,7 +503,7 @@ nfs_downgrade_vnlock(struct vnode *vp, struct thread *td, int old_lock)
/* Downgrade from exclusive lock, this might block */
vn_lock(vp, LK_DOWNGRADE);
} else {
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
}
}
}
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c
index a123708..d2f4924 100644
--- a/sys/nfsclient/nfs_vfsops.c
+++ b/sys/nfsclient/nfs_vfsops.c
@@ -947,7 +947,7 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
/*
* Lose the lock but keep the ref.
*/
- VOP_UNLOCK(*vpp, 0, curthread);
+ VOP_UNLOCK(*vpp, 0);
return (0);
bad:
@@ -1065,7 +1065,7 @@ loop:
error = VOP_FSYNC(vp, waitfor, td);
if (error)
allerror = error;
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vrele(vp);
MNT_ILOCK(mp);
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c
index 358b29a..1a27e82 100644
--- a/sys/nfsclient/nfs_vnops.c
+++ b/sys/nfsclient/nfs_vnops.c
@@ -930,7 +930,7 @@ nfs_lookup(struct vop_lookup_args *ap)
}
if (flags & ISDOTDOT) {
- VOP_UNLOCK(dvp, 0, td);
+ VOP_UNLOCK(dvp, 0);
error = nfs_nget(dvp->v_mount, fhp, fhsize, &np, cnp->cn_lkflags);
vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
if (error)
@@ -1622,7 +1622,7 @@ nfs_rename(struct vop_rename_args *ap)
* this condition can result in potential (silent) data loss.
*/
error = VOP_FSYNC(fvp, MNT_WAIT, fcnp->cn_thread);
- VOP_UNLOCK(fvp, 0, fcnp->cn_thread);
+ VOP_UNLOCK(fvp, 0);
if (!error && tvp)
error = VOP_FSYNC(tvp, MNT_WAIT, tcnp->cn_thread);
if (error)
diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c
index 3c9562f..4091c84 100644
--- a/sys/nfsserver/nfs_serv.c
+++ b/sys/nfsserver/nfs_serv.c
@@ -545,7 +545,7 @@ nfsrv_lookup(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
* via the original nd. Confused? You aren't alone!
*/
ind = nd;
- VOP_UNLOCK(nd.ni_vp, 0, td);
+ VOP_UNLOCK(nd.ni_vp, 0);
ind.ni_pathlen = strlen(nfs_pub.np_index);
ind.ni_cnd.cn_nameptr = ind.ni_cnd.cn_pnbuf =
nfs_pub.np_index;
@@ -1482,7 +1482,7 @@ loop1:
mvfslocked = 0;
if (!error) {
if (vn_start_write(vp, &mntp, V_NOWAIT) != 0) {
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
error = vn_start_write(NULL, &mntp, V_WAIT);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
}
@@ -1890,7 +1890,7 @@ nfsrv_create(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
vn_lock(dirp, LK_EXCLUSIVE | LK_RETRY);
diraft_ret = VOP_GETATTR(dirp, &diraft, cred, td);
- VOP_UNLOCK(dirp, 0, td);
+ VOP_UNLOCK(dirp, 0);
}
}
ereply:
@@ -2092,7 +2092,7 @@ out:
if (dirp) {
vn_lock(dirp, LK_EXCLUSIVE | LK_RETRY);
diraft_ret = VOP_GETATTR(dirp, &diraft, cred, td);
- VOP_UNLOCK(dirp, 0, td);
+ VOP_UNLOCK(dirp, 0);
}
ereply:
nfsm_reply(NFSX_SRVFH(1) + NFSX_POSTOPATTR(1) + NFSX_WCCDATA(1));
@@ -2209,7 +2209,7 @@ out:
vn_lock(dirp, LK_EXCLUSIVE | LK_RETRY);
diraft_ret = VOP_GETATTR(dirp, &diraft, cred, td);
- VOP_UNLOCK(dirp, 0, td);
+ VOP_UNLOCK(dirp, 0);
}
vrele(dirp);
dirp = NULL;
@@ -2420,12 +2420,12 @@ out1:
if (fdirp) {
vn_lock(fdirp, LK_EXCLUSIVE | LK_RETRY);
fdiraft_ret = VOP_GETATTR(fdirp, &fdiraft, cred, td);
- VOP_UNLOCK(fdirp, 0, td);
+ VOP_UNLOCK(fdirp, 0);
}
if (tdirp) {
vn_lock(tdirp, LK_EXCLUSIVE | LK_RETRY);
tdiraft_ret = VOP_GETATTR(tdirp, &tdiraft, cred, td);
- VOP_UNLOCK(tdirp, 0, td);
+ VOP_UNLOCK(tdirp, 0);
}
nfsm_srvwcc_data(fdirfor_ret, &fdirfor, fdiraft_ret, &fdiraft);
nfsm_srvwcc_data(tdirfor_ret, &tdirfor, tdiraft_ret, &tdiraft);
@@ -2528,7 +2528,7 @@ nfsrv_link(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
error = EPERM; /* POSIX */
goto out1;
}
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
nd.ni_cnd.cn_cred = cred;
nd.ni_cnd.cn_nameiop = CREATE;
nd.ni_cnd.cn_flags = LOCKPARENT | MPSAFE | MPSAFE;
@@ -2585,7 +2585,7 @@ out2:
vn_lock(dirp, LK_EXCLUSIVE | LK_RETRY);
diraft_ret = VOP_GETATTR(dirp, &diraft, cred, td);
- VOP_UNLOCK(dirp, 0, td);
+ VOP_UNLOCK(dirp, 0);
}
}
ereply:
@@ -2761,7 +2761,7 @@ out:
if (dirp) {
vn_lock(dirp, LK_EXCLUSIVE | LK_RETRY);
diraft_ret = VOP_GETATTR(dirp, &diraft, cred, td);
- VOP_UNLOCK(dirp, 0, td);
+ VOP_UNLOCK(dirp, 0);
}
if (nd.ni_startdir) {
vrele(nd.ni_startdir);
@@ -2923,7 +2923,7 @@ out:
nd.ni_vp = NULL;
vn_lock(dirp, LK_EXCLUSIVE | LK_RETRY);
diraft_ret = VOP_GETATTR(dirp, &diraft, cred, td);
- VOP_UNLOCK(dirp, 0, td);
+ VOP_UNLOCK(dirp, 0);
}
}
nfsm_reply(NFSX_SRVFH(v3) + NFSX_POSTOPATTR(v3) + NFSX_WCCDATA(v3));
@@ -3060,7 +3060,7 @@ out:
nd.ni_vp = NULL;
vn_lock(dirp, LK_EXCLUSIVE | LK_RETRY);
diraft_ret = VOP_GETATTR(dirp, &diraft, cred, td);
- VOP_UNLOCK(dirp, 0, td);
+ VOP_UNLOCK(dirp, 0);
}
}
nfsm_reply(NFSX_WCCDATA(v3));
@@ -3217,7 +3217,7 @@ nfsrv_readdir(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
error = 0;
goto nfsmout;
}
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
/*
* end section. Allocate rbuf and continue
@@ -3248,7 +3248,7 @@ again:
if (!error)
error = getret;
}
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if (error) {
vrele(vp);
vp = NULL;
@@ -3503,7 +3503,7 @@ nfsrv_readdirplus(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
error = 0;
goto nfsmout;
}
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
MALLOC(rbuf, caddr_t, siz, M_TEMP, M_WAITOK);
again:
iv.iov_base = rbuf;
@@ -3524,7 +3524,7 @@ again:
error = VOP_READDIR(vp, &io, cred, &eofflag, &ncookies, &cookies);
off = (u_quad_t)io.uio_offset;
getret = VOP_GETATTR(vp, &at, cred, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if (!cookies && !error)
error = NFSERR_PERM;
if (!error)
diff --git a/sys/nfsserver/nfs_srvsubs.c b/sys/nfsserver/nfs_srvsubs.c
index af10f03..4bf3bae 100644
--- a/sys/nfsserver/nfs_srvsubs.c
+++ b/sys/nfsserver/nfs_srvsubs.c
@@ -690,7 +690,7 @@ nfs_namei(struct nameidata *ndp, fhandle_t *fhp, int len,
vn_lock(dp, LK_EXCLUSIVE | LK_RETRY);
*retdirattr_retp = VOP_GETATTR(dp, retdirattrp,
ndp->ni_cnd.cn_cred, td);
- VOP_UNLOCK(dp, 0, td);
+ VOP_UNLOCK(dp, 0);
}
if (pubflag) {
@@ -801,7 +801,7 @@ nfs_namei(struct nameidata *ndp, fhandle_t *fhp, int len,
else
uma_zfree(namei_zone, cnp->cn_pnbuf);
if (ndp->ni_vp && !lockleaf)
- VOP_UNLOCK(ndp->ni_vp, 0, td);
+ VOP_UNLOCK(ndp->ni_vp, 0);
break;
}
@@ -809,7 +809,7 @@ nfs_namei(struct nameidata *ndp, fhandle_t *fhp, int len,
* Validate symlink
*/
if ((cnp->cn_flags & LOCKPARENT) && ndp->ni_pathlen == 1)
- VOP_UNLOCK(ndp->ni_dvp, 0, td);
+ VOP_UNLOCK(ndp->ni_dvp, 0);
if (!pubflag) {
error = EINVAL;
goto badlink2;
@@ -1083,7 +1083,6 @@ nfsrv_fhtovp(fhandle_t *fhp, int lockflag, struct vnode **vpp, int *vfslockedp,
struct ucred *cred, struct nfssvc_sock *slp, struct sockaddr *nam,
int *rdonlyp, int pubflag)
{
- struct thread *td = curthread; /* XXX */
struct mount *mp;
int i;
struct ucred *credanon;
@@ -1140,7 +1139,7 @@ nfsrv_fhtovp(fhandle_t *fhp, int lockflag, struct vnode **vpp, int *vfslockedp,
*rdonlyp = 0;
if (!lockflag)
- VOP_UNLOCK(*vpp, 0, td);
+ VOP_UNLOCK(*vpp, 0);
out:
vfs_rel(mp);
if (error) {
diff --git a/sys/security/audit/audit_arg.c b/sys/security/audit/audit_arg.c
index 7d84f76..199aa47 100644
--- a/sys/security/audit/audit_arg.c
+++ b/sys/security/audit/audit_arg.c
@@ -632,7 +632,7 @@ audit_arg_file(struct proc *p, struct file *fp)
vfslocked = VFS_LOCK_GIANT(vp->v_mount);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
audit_arg_vnode(vp, ARG_VNODE1);
- VOP_UNLOCK(vp, 0, curthread);
+ VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
break;
@@ -850,7 +850,7 @@ audit_sysclose(struct thread *td, int fd)
vfslocked = VFS_LOCK_GIANT(vp->v_mount);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
audit_arg_vnode(vp, ARG_VNODE1);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
fdrop(fp, td);
}
diff --git a/sys/security/audit/audit_syscalls.c b/sys/security/audit/audit_syscalls.c
index f9865f5..5a841fb 100644
--- a/sys/security/audit/audit_syscalls.c
+++ b/sys/security/audit/audit_syscalls.c
@@ -656,14 +656,14 @@ auditctl(struct thread *td, struct auditctl_args *uap)
vp = nd.ni_vp;
#ifdef MAC
error = mac_system_check_auditctl(td->td_ucred, vp);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if (error) {
vn_close(vp, AUDIT_CLOSE_FLAGS, td->td_ucred, td);
VFS_UNLOCK_GIANT(vfslocked);
return (error);
}
#else
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
#endif
NDFREE(&nd, NDF_ONLY_PNBUF);
if (vp->v_type != VREG) {
diff --git a/sys/security/audit/audit_worker.c b/sys/security/audit/audit_worker.c
index 35df1b2..102e9f9 100644
--- a/sys/security/audit/audit_worker.c
+++ b/sys/security/audit/audit_worker.c
@@ -138,7 +138,7 @@ audit_record_write(struct vnode *vp, struct ucred *cred, struct thread *td,
goto fail;
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_GETATTR(vp, &vattr, cred, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if (error)
goto fail;
audit_fstat.af_currsz = vattr.va_size;
@@ -251,9 +251,9 @@ audit_record_write(struct vnode *vp, struct ucred *cred, struct thread *td,
*/
if (audit_in_failure) {
if (audit_q_len == 0 && audit_pre_q_len == 0) {
- VOP_LOCK(vp, LK_DRAIN | LK_INTERLOCK, td);
+ VOP_LOCK(vp, LK_DRAIN | LK_INTERLOCK);
(void)VOP_FSYNC(vp, MNT_WAIT, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
panic("Audit store overflow; record queue drained.");
}
}
@@ -268,9 +268,9 @@ fail_enospc:
* space, or ENOSPC returned by the vnode write call.
*/
if (audit_fail_stop) {
- VOP_LOCK(vp, LK_DRAIN | LK_INTERLOCK, td);
+ VOP_LOCK(vp, LK_DRAIN | LK_INTERLOCK);
(void)VOP_FSYNC(vp, MNT_WAIT, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
panic("Audit log space exhausted and fail-stop set.");
}
(void)send_trigger(AUDIT_TRIGGER_NO_SPACE);
@@ -283,9 +283,9 @@ fail:
* lost, which may require an immediate system halt.
*/
if (audit_panic_on_write_fail) {
- VOP_LOCK(vp, LK_DRAIN | LK_INTERLOCK, td);
+ VOP_LOCK(vp, LK_DRAIN | LK_INTERLOCK);
(void)VOP_FSYNC(vp, MNT_WAIT, td);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
panic("audit_worker: write error %d\n", error);
} else if (ppsratecheck(&last_fail, &cur_fail, 1))
printf("audit_worker: write error %d\n", error);
diff --git a/sys/security/mac/mac_process.c b/sys/security/mac/mac_process.c
index 6c81e08..d136387 100644
--- a/sys/security/mac/mac_process.c
+++ b/sys/security/mac/mac_process.c
@@ -368,7 +368,7 @@ mac_cred_mmapped_drop_perms_recurse(struct thread *td, struct ucred *cred,
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
result = vme->max_protection;
mac_vnode_check_mmap_downgrade(cred, vp, &result);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
/*
* Find out what maximum protection we may be allowing now
* but a policy needs to get removed.
@@ -409,7 +409,7 @@ mac_cred_mmapped_drop_perms_recurse(struct thread *td, struct ucred *cred,
PAGE_MASK),
OBJPC_SYNC);
VM_OBJECT_UNLOCK(object);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
vm_object_deallocate(object);
/*
diff --git a/sys/security/mac/mac_syscalls.c b/sys/security/mac/mac_syscalls.c
index 9d8227d..9b5286c 100644
--- a/sys/security/mac/mac_syscalls.c
+++ b/sys/security/mac/mac_syscalls.c
@@ -257,7 +257,7 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
vfslocked = VFS_LOCK_GIANT(vp->v_mount);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
mac_vnode_copy_label(vp->v_label, intlabel);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
error = mac_vnode_externalize_label(intlabel, elements,
buffer, mac.m_buflen);
@@ -450,7 +450,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
}
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = vn_setlabel(vp, intlabel, td->td_ucred);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
VFS_UNLOCK_GIANT(vfslocked);
mac_vnode_label_free(intlabel);
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 674e07a..abbc9e1 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -701,7 +701,7 @@ void vop_unlock_pre(void *a);
| (noffset > osize ? NOTE_EXTEND : 0)); \
}
-#define VOP_LOCK(vp, flags, td) VOP_LOCK1(vp, flags, td, __FILE__, __LINE__)
+#define VOP_LOCK(vp, flags) VOP_LOCK1(vp, flags, __FILE__, __LINE__)
void vput(struct vnode *vp);
diff --git a/sys/ufs/ffs/ffs_rawread.c b/sys/ufs/ffs/ffs_rawread.c
index ae26c1d..6369f58 100644
--- a/sys/ufs/ffs/ffs_rawread.c
+++ b/sys/ufs/ffs/ffs_rawread.c
@@ -118,13 +118,13 @@ ffs_rawread_sync(struct vnode *vp, struct thread *td)
upgraded = 1;
else
upgraded = 0;
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
(void) vn_start_write(vp, &mp, V_WAIT);
- VOP_LOCK(vp, LK_EXCLUSIVE, td);
+ VOP_LOCK(vp, LK_EXCLUSIVE);
} else if (VOP_ISLOCKED(vp, td) != LK_EXCLUSIVE) {
upgraded = 1;
/* Upgrade to exclusive lock, this might block */
- VOP_LOCK(vp, LK_UPGRADE, td);
+ VOP_LOCK(vp, LK_UPGRADE);
} else
upgraded = 0;
@@ -134,7 +134,7 @@ ffs_rawread_sync(struct vnode *vp, struct thread *td)
if ((vp->v_iflag & VI_DOOMED) != 0) {
VI_UNLOCK(vp);
if (upgraded != 0)
- VOP_LOCK(vp, LK_DOWNGRADE, td);
+ VOP_LOCK(vp, LK_DOWNGRADE);
vn_finished_write(mp);
return (EIO);
}
@@ -157,7 +157,7 @@ ffs_rawread_sync(struct vnode *vp, struct thread *td)
splx(spl);
VI_UNLOCK(vp);
if (upgraded != 0)
- VOP_LOCK(vp, LK_DOWNGRADE, td);
+ VOP_LOCK(vp, LK_DOWNGRADE);
vn_finished_write(mp);
return (error);
}
@@ -167,7 +167,7 @@ ffs_rawread_sync(struct vnode *vp, struct thread *td)
VI_UNLOCK(vp);
if ((error = ffs_syncvnode(vp, MNT_WAIT)) != 0) {
if (upgraded != 0)
- VOP_LOCK(vp, LK_DOWNGRADE, td);
+ VOP_LOCK(vp, LK_DOWNGRADE);
vn_finished_write(mp);
return (error);
}
@@ -179,7 +179,7 @@ ffs_rawread_sync(struct vnode *vp, struct thread *td)
splx(spl);
VI_UNLOCK(vp);
if (upgraded != 0)
- VOP_LOCK(vp, LK_DOWNGRADE, td);
+ VOP_LOCK(vp, LK_DOWNGRADE);
vn_finished_write(mp);
} else {
splx(spl);
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c
index 8453305..4be6f38 100644
--- a/sys/ufs/ffs/ffs_snapshot.c
+++ b/sys/ufs/ffs/ffs_snapshot.c
@@ -274,7 +274,7 @@ restart:
}
VOP_LEASE(nd.ni_dvp, td, KERNCRED, LEASE_WRITE);
error = VOP_CREATE(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vat);
- VOP_UNLOCK(nd.ni_dvp, 0, td);
+ VOP_UNLOCK(nd.ni_dvp, 0);
if (error) {
NDFREE(&nd, NDF_ONLY_PNBUF);
vn_finished_write(wrtmp);
@@ -382,7 +382,7 @@ restart:
*/
if ((error = ffs_syncvnode(vp, MNT_WAIT)) != 0)
goto out;
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
/*
* All allocations are done, so we can now snapshot the system.
*
@@ -544,7 +544,7 @@ loop:
if (xvp->v_usecount == 0 &&
(xvp->v_iflag & (VI_OWEINACT | VI_DOINGINACT)) == 0) {
VI_UNLOCK(xvp);
- VOP_UNLOCK(xvp, 0, td);
+ VOP_UNLOCK(xvp, 0);
vdrop(xvp);
MNT_ILOCK(mp);
continue;
@@ -554,14 +554,14 @@ loop:
vprint("ffs_snapshot: busy vnode", xvp);
if (VOP_GETATTR(xvp, &vat, td->td_ucred, td) == 0 &&
vat.va_nlink > 0) {
- VOP_UNLOCK(xvp, 0, td);
+ VOP_UNLOCK(xvp, 0);
vdrop(xvp);
MNT_ILOCK(mp);
continue;
}
xp = VTOI(xvp);
if (ffs_checkfreefile(copy_fs, vp, xp->i_number)) {
- VOP_UNLOCK(xvp, 0, td);
+ VOP_UNLOCK(xvp, 0);
vdrop(xvp);
MNT_ILOCK(mp);
continue;
@@ -592,7 +592,7 @@ loop:
if (!error)
error = ffs_freefile(ump, copy_fs, vp, xp->i_number,
xp->i_mode);
- VOP_UNLOCK(xvp, 0, td);
+ VOP_UNLOCK(xvp, 0);
vdrop(xvp);
if (error) {
free(copy_fs->fs_csp, M_UFSMNT);
@@ -796,7 +796,7 @@ out1:
* the snapshot lock until the buffer has been written.
*/
VREF(vp); /* Protect against ffs_snapgone() */
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
(void) bread(ip->i_devvp,
fsbtodb(fs, ino_to_fsba(fs, ip->i_number)),
(int) fs->fs_bsize, NOCRED, &nbp);
@@ -836,7 +836,7 @@ out:
if (error)
vput(vp);
else
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vrele(nd.ni_dvp);
vn_finished_write(wrtmp);
process_deferred_inactive(mp);
@@ -1978,7 +1978,7 @@ ffs_snapshot_mount(mp)
TAILQ_INSERT_TAIL(&sn->sn_head, ip, i_nextsnap);
vp->v_vflag |= VV_SYSTEM;
VI_UNLOCK(devvp);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
lastvp = vp;
}
vp = lastvp;
@@ -2004,7 +2004,7 @@ ffs_snapshot_mount(mp)
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if ((error = VOP_READ(vp, &auio, IO_UNIT, td->td_ucred)) != 0) {
printf("ffs_snapshot_mount: read_1 failed %d\n", error);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
return;
}
MALLOC(snapblklist, void *, snaplistsize * sizeof(daddr_t),
@@ -2016,11 +2016,11 @@ ffs_snapshot_mount(mp)
auio.uio_offset -= sizeof(snaplistsize);
if ((error = VOP_READ(vp, &auio, IO_UNIT, td->td_ucred)) != 0) {
printf("ffs_snapshot_mount: read_2 failed %d\n", error);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
FREE(snapblklist, M_UFSMNT);
return;
}
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
VI_LOCK(devvp);
ASSERT_VOP_LOCKED(devvp, "ffs_snapshot_mount");
sn->sn_listsize = snaplistsize;
@@ -2468,7 +2468,7 @@ process_deferred_inactive(struct mount *mp)
VI_LOCK(vp);
if ((vp->v_iflag & VI_OWEINACT) == 0 || vp->v_usecount > 0) {
VI_UNLOCK(vp);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vdrop(vp);
MNT_ILOCK(mp);
continue;
@@ -2488,7 +2488,7 @@ process_deferred_inactive(struct mount *mp)
("process_deferred_inactive: got VI_OWEINACT"));
vp->v_iflag &= ~VI_DOINGINACT;
VI_UNLOCK(vp);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vdrop(vp);
MNT_ILOCK(mp);
}
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
index 60e3de9..e4838e3 100644
--- a/sys/ufs/ffs/ffs_softdep.c
+++ b/sys/ufs/ffs/ffs_softdep.c
@@ -1031,7 +1031,7 @@ softdep_flushworklist(oldmnt, countp, td)
*countp += count;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_FSYNC(devvp, MNT_WAIT, td);
- VOP_UNLOCK(devvp, 0, td);
+ VOP_UNLOCK(devvp, 0);
if (error)
break;
}
@@ -5075,7 +5075,7 @@ softdep_fsync(vp)
*/
FREE_LOCK(&lk);
if (ffs_vget(mp, parentino, LK_NOWAIT | LK_EXCLUSIVE, &pvp)) {
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
error = ffs_vget(mp, parentino, LK_EXCLUSIVE, &pvp);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if (error != 0)
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 93f9e72..ae3fbeb 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -267,10 +267,10 @@ ffs_mount(struct mount *mp, struct thread *td)
if (error)
error = priv_check(td, PRIV_VFS_MOUNT_PERM);
if (error) {
- VOP_UNLOCK(devvp, 0, td);
+ VOP_UNLOCK(devvp, 0);
return (error);
}
- VOP_UNLOCK(devvp, 0, td);
+ VOP_UNLOCK(devvp, 0);
fs->fs_flags &= ~FS_UNCLEAN;
if (fs->fs_clean == 0) {
fs->fs_flags |= FS_UNCLEAN;
@@ -470,7 +470,7 @@ ffs_reload(struct mount *mp, struct thread *td)
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
if (vinvalbuf(devvp, 0, td, 0, 0) != 0)
panic("ffs_reload: dirty1");
- VOP_UNLOCK(devvp, 0, td);
+ VOP_UNLOCK(devvp, 0);
/*
* Step 2: re-read superblock from disk.
@@ -565,7 +565,7 @@ loop:
bread(devvp, fsbtodb(fs, ino_to_fsba(fs, ip->i_number)),
(int)fs->fs_bsize, NOCRED, &bp);
if (error) {
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vrele(vp);
MNT_VNODE_FOREACH_ABORT(mp, mvp);
return (error);
@@ -573,7 +573,7 @@ loop:
ffs_load_inode(bp, ip, fs, ip->i_number);
ip->i_effnlink = ip->i_nlink;
brelse(bp);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vrele(vp);
MNT_ILOCK(mp);
}
@@ -623,7 +623,7 @@ ffs_mountfs(devvp, mp, td)
error = g_access(cp, 0, 0, -1);
g_topology_unlock();
PICKUP_GIANT();
- VOP_UNLOCK(devvp, 0, td);
+ VOP_UNLOCK(devvp, 0);
if (error)
return (error);
if (devvp->v_rdev->si_iosize_max != 0)
@@ -1122,7 +1122,7 @@ ffs_flushfiles(mp, flags, td)
*/
vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_FSYNC(ump->um_devvp, MNT_WAIT, td);
- VOP_UNLOCK(ump->um_devvp, 0, td);
+ VOP_UNLOCK(ump->um_devvp, 0);
return (error);
}
@@ -1273,7 +1273,7 @@ loop:
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY | LK_INTERLOCK);
if ((error = VOP_FSYNC(devvp, waitfor, td)) != 0)
allerror = error;
- VOP_UNLOCK(devvp, 0, td);
+ VOP_UNLOCK(devvp, 0);
if (allerror == 0 && waitfor == MNT_WAIT) {
MNT_ILOCK(mp);
goto loop;
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c
index f60c5cc..c217fe5 100644
--- a/sys/ufs/ffs/ffs_vnops.c
+++ b/sys/ufs/ffs/ffs_vnops.c
@@ -370,7 +370,8 @@ ffs_lock(ap)
flags |= LK_INTERLOCK;
}
lkp = vp->v_vnlock;
- result = _lockmgr(lkp, flags, VI_MTX(vp), ap->a_td, ap->a_file, ap->a_line);
+ result = _lockmgr(lkp, flags, VI_MTX(vp), curthread,
+ ap->a_file, ap->a_line);
if (lkp == vp->v_vnlock || result != 0)
break;
/*
@@ -381,7 +382,8 @@ ffs_lock(ap)
* right lock. Release it, and try to get the
* new lock.
*/
- (void) _lockmgr(lkp, LK_RELEASE, VI_MTX(vp), ap->a_td, ap->a_file, ap->a_line);
+ (void) _lockmgr(lkp, LK_RELEASE, VI_MTX(vp), curthread,
+ ap->a_file, ap->a_line);
if ((flags & LK_TYPE_MASK) == LK_UPGRADE)
flags = (flags & ~LK_TYPE_MASK) | LK_EXCLUSIVE;
flags &= ~LK_INTERLOCK;
diff --git a/sys/ufs/ufs/ufs_extattr.c b/sys/ufs/ufs/ufs_extattr.c
index 3d6ec2f..7fcd88b 100644
--- a/sys/ufs/ufs/ufs_extattr.c
+++ b/sys/ufs/ufs/ufs_extattr.c
@@ -261,7 +261,7 @@ ufs_extattr_lookup(struct vnode *start_dvp, int lockparent, char *dirname,
(size_t *) &cnp.cn_namelen);
if (error) {
if (lockparent == UE_GETDIR_LOCKPARENT_DONT) {
- VOP_UNLOCK(start_dvp, 0, td);
+ VOP_UNLOCK(start_dvp, 0);
}
uma_zfree(namei_zone, cnp.cn_pnbuf);
printf("ufs_extattr_lookup: copystr failed\n");
@@ -280,7 +280,7 @@ ufs_extattr_lookup(struct vnode *start_dvp, int lockparent, char *dirname,
* if ufs_lookup() didn't.
*/
if (lockparent == UE_GETDIR_LOCKPARENT_DONT)
- VOP_UNLOCK(start_dvp, 0, td);
+ VOP_UNLOCK(start_dvp, 0);
/*
* Check that ufs_lookup() didn't release the lock when we
@@ -297,7 +297,7 @@ ufs_extattr_lookup(struct vnode *start_dvp, int lockparent, char *dirname,
*/
if (target_vp != start_dvp && lockparent == UE_GETDIR_LOCKPARENT_DONT)
- VOP_UNLOCK(start_dvp, 0, td);
+ VOP_UNLOCK(start_dvp, 0);
if (lockparent == UE_GETDIR_LOCKPARENT)
ASSERT_VOP_LOCKED(start_dvp, "ufs_extattr_lookup");
@@ -325,7 +325,7 @@ ufs_extattr_enable_with_open(struct ufsmount *ump, struct vnode *vp,
if (error) {
printf("ufs_extattr_enable_with_open.VOP_OPEN(): failed "
"with %d\n", error);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
return (error);
}
@@ -333,7 +333,7 @@ ufs_extattr_enable_with_open(struct ufsmount *ump, struct vnode *vp,
vref(vp);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
error = ufs_extattr_enable(ump, attrnamespace, attrname, vp, td);
if (error != 0)
@@ -642,11 +642,11 @@ ufs_extattr_enable(struct ufsmount *ump, int attrnamespace,
LIST_INSERT_HEAD(&ump->um_extattr.uepm_list, attribute,
uele_entries);
- VOP_UNLOCK(backing_vnode, 0, td);
+ VOP_UNLOCK(backing_vnode, 0);
return (0);
unlock_free_exit:
- VOP_UNLOCK(backing_vnode, 0, td);
+ VOP_UNLOCK(backing_vnode, 0);
free_exit:
FREE(attribute, M_UFS_EXTATTR);
@@ -674,7 +674,7 @@ ufs_extattr_disable(struct ufsmount *ump, int attrnamespace,
vn_lock(uele->uele_backing_vnode, LK_SHARED | LK_RETRY);
ASSERT_VOP_LOCKED(uele->uele_backing_vnode, "ufs_extattr_disable");
- VOP_UNLOCK(uele->uele_backing_vnode, 0, td);
+ VOP_UNLOCK(uele->uele_backing_vnode, 0);
error = vn_close(uele->uele_backing_vnode, FREAD|FWRITE,
td->td_ucred, td);
@@ -702,14 +702,14 @@ ufs_extattrctl(struct mount *mp, int cmd, struct vnode *filename_vp,
error = priv_check(td, PRIV_UFS_EXTATTRCTL);
if (error) {
if (filename_vp != NULL)
- VOP_UNLOCK(filename_vp, 0, td);
+ VOP_UNLOCK(filename_vp, 0);
return (error);
}
switch(cmd) {
case UFS_EXTATTR_CMD_START:
if (filename_vp != NULL) {
- VOP_UNLOCK(filename_vp, 0, td);
+ VOP_UNLOCK(filename_vp, 0);
return (EINVAL);
}
if (attrname != NULL)
@@ -721,7 +721,7 @@ ufs_extattrctl(struct mount *mp, int cmd, struct vnode *filename_vp,
case UFS_EXTATTR_CMD_STOP:
if (filename_vp != NULL) {
- VOP_UNLOCK(filename_vp, 0, td);
+ VOP_UNLOCK(filename_vp, 0);
return (EINVAL);
}
if (attrname != NULL)
@@ -736,7 +736,7 @@ ufs_extattrctl(struct mount *mp, int cmd, struct vnode *filename_vp,
if (filename_vp == NULL)
return (EINVAL);
if (attrname == NULL) {
- VOP_UNLOCK(filename_vp, 0, td);
+ VOP_UNLOCK(filename_vp, 0);
return (EINVAL);
}
@@ -754,7 +754,7 @@ ufs_extattrctl(struct mount *mp, int cmd, struct vnode *filename_vp,
case UFS_EXTATTR_CMD_DISABLE:
if (filename_vp != NULL) {
- VOP_UNLOCK(filename_vp, 0, td);
+ VOP_UNLOCK(filename_vp, 0);
return (EINVAL);
}
if (attrname == NULL)
@@ -939,7 +939,7 @@ vopunlock_exit:
uio->uio_offset = 0;
if (attribute->uele_backing_vnode != vp)
- VOP_UNLOCK(attribute->uele_backing_vnode, 0, td);
+ VOP_UNLOCK(attribute->uele_backing_vnode, 0);
return (error);
}
@@ -1113,7 +1113,7 @@ vopunlock_exit:
uio->uio_offset = 0;
if (attribute->uele_backing_vnode != vp)
- VOP_UNLOCK(attribute->uele_backing_vnode, 0, td);
+ VOP_UNLOCK(attribute->uele_backing_vnode, 0);
return (error);
}
@@ -1232,7 +1232,7 @@ ufs_extattr_rm(struct vnode *vp, int attrnamespace, const char *name,
error = ENXIO;
vopunlock_exit:
- VOP_UNLOCK(attribute->uele_backing_vnode, 0, td);
+ VOP_UNLOCK(attribute->uele_backing_vnode, 0);
return (error);
}
diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c
index f6e456b..ea1d794 100644
--- a/sys/ufs/ufs/ufs_lookup.c
+++ b/sys/ufs/ufs/ufs_lookup.c
@@ -153,7 +153,6 @@ ufs_lookup(ap)
struct ucred *cred = cnp->cn_cred;
int flags = cnp->cn_flags;
int nameiop = cnp->cn_nameiop;
- struct thread *td = cnp->cn_thread;
ino_t saved_ino;
bp = NULL;
@@ -559,7 +558,7 @@ found:
pdp = vdp;
if (flags & ISDOTDOT) {
saved_ino = dp->i_ino;
- VOP_UNLOCK(pdp, 0, td); /* race to get the inode */
+ VOP_UNLOCK(pdp, 0); /* race to get the inode */
error = VFS_VGET(pdp->v_mount, saved_ino,
cnp->cn_lkflags, &tdp);
vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY);
@@ -784,7 +783,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp)
if ((error = bwrite(bp)))
return (error);
if (tvp != NULL)
- VOP_UNLOCK(tvp, 0, td);
+ VOP_UNLOCK(tvp, 0);
error = VOP_FSYNC(dvp, MNT_WAIT, td);
if (tvp != NULL)
vn_lock(tvp, LK_EXCLUSIVE | LK_RETRY);
@@ -942,7 +941,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp)
*/
if (error == 0 && dp->i_endoff && dp->i_endoff < dp->i_size) {
if (tvp != NULL)
- VOP_UNLOCK(tvp, 0, td);
+ VOP_UNLOCK(tvp, 0);
#ifdef UFS_DIRHASH
if (dp->i_dirhash != NULL)
ufsdirhash_dirtrunc(dp, dp->i_endoff);
diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c
index dee110d..2075e80 100644
--- a/sys/ufs/ufs/ufs_quota.c
+++ b/sys/ufs/ufs/ufs_quota.c
@@ -530,7 +530,7 @@ quotaon(td, mp, type, fname)
vfslocked = NDHASGIANT(&nd);
NDFREE(&nd, NDF_ONLY_PNBUF);
vp = nd.ni_vp;
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
if (vp->v_type != VREG) {
(void) vn_close(vp, FREAD|FWRITE, td->td_ucred, td);
VFS_UNLOCK_GIANT(vfslocked);
@@ -556,7 +556,7 @@ quotaon(td, mp, type, fname)
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
vp->v_vflag |= VV_SYSTEM;
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
*vpp = vp;
VFS_UNLOCK_GIANT(vfslocked);
/*
@@ -596,13 +596,13 @@ again:
goto again;
}
if (vp->v_type == VNON || vp->v_writecount == 0) {
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vrele(vp);
MNT_ILOCK(mp);
continue;
}
error = getinoquota(VTOI(vp));
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vrele(vp);
MNT_ILOCK(mp);
if (error) {
@@ -677,7 +677,7 @@ again:
dq = ip->i_dquot[type];
ip->i_dquot[type] = NODQUOT;
dqrele(vp, dq);
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vrele(vp);
MNT_ILOCK(mp);
}
@@ -695,7 +695,7 @@ again:
vfslocked = VFS_LOCK_GIANT(qvp->v_mount);
vn_lock(qvp, LK_EXCLUSIVE | LK_RETRY);
qvp->v_vflag &= ~VV_SYSTEM;
- VOP_UNLOCK(qvp, 0, td);
+ VOP_UNLOCK(qvp, 0);
error = vn_close(qvp, FREAD|FWRITE, td->td_ucred, td);
VFS_UNLOCK_GIANT(vfslocked);
crfree(cr);
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
index 0d2a6a5..57763bc 100644
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -829,7 +829,7 @@ ufs_remove(ap)
* while holding the snapshot vnode locked, assuming
* that the directory hasn't been unlinked too.
*/
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
(void) VOP_FSYNC(dvp, MNT_WAIT, td);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
}
@@ -1042,13 +1042,13 @@ abortit:
dp = VTOI(fdvp);
ip = VTOI(fvp);
if (ip->i_nlink >= LINK_MAX) {
- VOP_UNLOCK(fvp, 0, td);
+ VOP_UNLOCK(fvp, 0);
error = EMLINK;
goto abortit;
}
if ((ip->i_flags & (NOUNLINK | IMMUTABLE | APPEND))
|| (dp->i_flags & APPEND)) {
- VOP_UNLOCK(fvp, 0, td);
+ VOP_UNLOCK(fvp, 0);
error = EPERM;
goto abortit;
}
@@ -1059,7 +1059,7 @@ abortit:
if ((fcnp->cn_namelen == 1 && fcnp->cn_nameptr[0] == '.') ||
dp == ip || (fcnp->cn_flags | tcnp->cn_flags) & ISDOTDOT ||
(ip->i_flag & IN_RENAME)) {
- VOP_UNLOCK(fvp, 0, td);
+ VOP_UNLOCK(fvp, 0);
error = EINVAL;
goto abortit;
}
@@ -1092,7 +1092,7 @@ abortit:
softdep_change_linkcnt(ip);
if ((error = UFS_UPDATE(fvp, !(DOINGSOFTDEP(fvp) |
DOINGASYNC(fvp)))) != 0) {
- VOP_UNLOCK(fvp, 0, td);
+ VOP_UNLOCK(fvp, 0);
goto bad;
}
@@ -1107,7 +1107,7 @@ abortit:
* call to checkpath().
*/
error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_thread);
- VOP_UNLOCK(fvp, 0, td);
+ VOP_UNLOCK(fvp, 0);
if (oldparent != dp->i_number)
newparent = dp->i_number;
if (doingdirectory && newparent) {
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
index 2350cf3..21a9826 100644
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -2120,7 +2120,7 @@ swapoff_one(struct swdevt *sp, struct ucred *cred)
#ifdef MAC
(void) vn_lock(sp->sw_vp, LK_EXCLUSIVE | LK_RETRY);
error = mac_system_check_swapoff(cred, sp->sw_vp);
- (void) VOP_UNLOCK(sp->sw_vp, 0, curthread);
+ (void) VOP_UNLOCK(sp->sw_vp, 0);
if (error != 0)
return (error);
#endif
@@ -2467,7 +2467,7 @@ swapongeom(struct thread *td, struct vnode *vp)
error = g_waitfor_event(swapongeom_ev, &swh, M_WAITOK, NULL);
if (!error)
error = swh.error;
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
return (error);
}
@@ -2533,7 +2533,7 @@ swaponvp(struct thread *td, struct vnode *vp, u_long nblks)
if (error == 0)
#endif
error = VOP_OPEN(vp, FREAD | FWRITE, td->td_ucred, td, NULL);
- (void) VOP_UNLOCK(vp, 0, td);
+ (void) VOP_UNLOCK(vp, 0);
if (error)
return (error);
diff --git a/sys/vm/vm_contig.c b/sys/vm/vm_contig.c
index cb12aec..8fec101 100644
--- a/sys/vm/vm_contig.c
+++ b/sys/vm/vm_contig.c
@@ -127,7 +127,7 @@ vm_contig_launder_page(vm_page_t m, vm_page_t *next)
VM_OBJECT_LOCK(object);
vm_object_page_clean(object, 0, 0, OBJPC_SYNC);
VM_OBJECT_UNLOCK(object);
- VOP_UNLOCK(vp, 0, curthread);
+ VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
vm_object_deallocate(object);
vn_finished_write(mp);
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 49fdc42..9df34ea 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -1055,7 +1055,7 @@ vm_object_sync(vm_object_t object, vm_ooffset_t offset, vm_size_t size,
OFF_TO_IDX(offset + size + PAGE_MASK),
flags);
VM_OBJECT_UNLOCK(object);
- VOP_UNLOCK(vp, 0, curthread);
+ VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
vn_finished_write(mp);
VM_OBJECT_LOCK(object);
diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c
index 5a752d9..4d6cea2 100644
--- a/sys/vm/vnode_pager.c
+++ b/sys/vm/vnode_pager.c
@@ -112,7 +112,7 @@ vnode_create_vobject(struct vnode *vp, off_t isize, struct thread *td)
VM_OBJECT_UNLOCK(object);
return (0);
}
- VOP_UNLOCK(vp, 0, td);
+ VOP_UNLOCK(vp, 0);
vm_object_set_flag(object, OBJ_DISCONNECTWNT);
msleep(object, VM_OBJECT_MTX(object), PDROP | PVM, "vodead", 0);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
OpenPOWER on IntegriCloud