summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-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
30 files changed, 125 insertions, 132 deletions
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;
};
OpenPOWER on IntegriCloud