summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_proc.c')
-rw-r--r--sys/kern/kern_proc.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index e54331e..8ee043e 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -1873,7 +1873,7 @@ sysctl_kern_proc_pathname(SYSCTL_HANDLER_ARGS)
struct proc *p;
struct vnode *vp;
char *retbuf, *freebuf;
- int error, vfslocked;
+ int error;
if (arglen != 1)
return (EINVAL);
@@ -1895,9 +1895,7 @@ sysctl_kern_proc_pathname(SYSCTL_HANDLER_ARGS)
if (*pidp != -1)
PROC_UNLOCK(p);
error = vn_fullpath(req->td, vp, &retbuf, &freebuf);
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
vrele(vp);
- VFS_UNLOCK_GIANT(vfslocked);
if (error)
return (error);
error = SYSCTL_OUT(req, retbuf, strlen(retbuf) + 1);
@@ -1964,7 +1962,6 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_ARGS)
entry = entry->next) {
vm_object_t obj, tobj, lobj;
vm_offset_t addr;
- int vfslocked;
if (entry->eflags & MAP_ENTRY_IS_SUB_MAP)
continue;
@@ -2061,14 +2058,12 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_ARGS)
vn_fullpath(curthread, vp, &fullpath,
&freepath);
cred = curthread->td_ucred;
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
vn_lock(vp, LK_SHARED | LK_RETRY);
if (VOP_GETATTR(vp, &va, cred) == 0) {
kve->kve_fileid = va.va_fileid;
kve->kve_fsid = va.va_fsid;
}
vput(vp);
- VFS_UNLOCK_GIANT(vfslocked);
}
} else {
kve->kve_type = KVME_TYPE_NONE;
@@ -2134,7 +2129,7 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_ARGS)
vm_object_t obj, tobj, lobj;
vm_offset_t addr;
vm_paddr_t locked_pa;
- int vfslocked, mincoreinfo;
+ int mincoreinfo;
if (entry->eflags & MAP_ENTRY_IS_SUB_MAP)
continue;
@@ -2239,7 +2234,6 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_ARGS)
&freepath);
kve->kve_vn_type = vntype_to_kinfo(vp->v_type);
cred = curthread->td_ucred;
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
vn_lock(vp, LK_SHARED | LK_RETRY);
if (VOP_GETATTR(vp, &va, cred) == 0) {
kve->kve_vn_fileid = va.va_fileid;
@@ -2251,7 +2245,6 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_ARGS)
kve->kve_status = KF_ATTR_VALID;
}
vput(vp);
- VFS_UNLOCK_GIANT(vfslocked);
}
} else {
kve->kve_type = KVME_TYPE_NONE;
OpenPOWER on IntegriCloud