summaryrefslogtreecommitdiff
path: root/sys/miscfs/procfs/procfs_vnops.c
diff options
context:
space:
mode:
authorConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>1997-11-06 05:59:40 +0000
committerConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>1997-11-06 05:59:40 +0000
commit4e165724f1631d1deee6fd89b941fabdbcc855d4 (patch)
tree3aca36af68e90377984b00e9f0050674b0763db5 /sys/miscfs/procfs/procfs_vnops.c
parentfec1be888534eb37405f6bf7a195f28670e1392b (diff)
Updates for VFS Lite 2 + soft update.
Diffstat (limited to 'sys/miscfs/procfs/procfs_vnops.c')
-rw-r--r--sys/miscfs/procfs/procfs_vnops.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c
index 3a7556f819a..11a74d5bd5b 100644
--- a/sys/miscfs/procfs/procfs_vnops.c
+++ b/sys/miscfs/procfs/procfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_vnops.c,v 1.8 1997/10/06 20:20:35 deraadt Exp $ */
+/* $OpenBSD: procfs_vnops.c,v 1.9 1997/11/06 05:58:43 csapuntz Exp $ */
/* $NetBSD: procfs_vnops.c,v 1.40 1996/03/16 23:52:55 christos Exp $ */
/*
@@ -728,6 +728,7 @@ procfs_lookup(v)
struct vnode **vpp = ap->a_vpp;
struct vnode *dvp = ap->a_dvp;
char *pname = cnp->cn_nameptr;
+ struct proc *curp = curproc;
struct proc_target *pt;
struct vnode *fvp;
pid_t pid;
@@ -787,7 +788,7 @@ procfs_lookup(v)
fvp = procfs_findtextvp(p);
/* We already checked that it exists. */
VREF(fvp);
- VOP_LOCK(fvp);
+ vn_lock(fvp, LK_EXCLUSIVE | LK_RETRY, curp);
*vpp = fvp;
return (0);
}
@@ -839,8 +840,6 @@ procfs_readdir(v)
struct pfsnode *pfs;
int i;
int error;
- u_long *cookies = ap->a_cookies;
- int ncookies = ap->a_ncookies;
pfs = VTOPFS(ap->a_vp);
@@ -880,8 +879,6 @@ procfs_readdir(v)
if ((error = uiomove((caddr_t)&d, UIO_MX, uio)) != 0)
break;
- if (ncookies-- > 0)
- *cookies++ = i + 1;
}
break;
@@ -943,8 +940,6 @@ procfs_readdir(v)
if ((error = uiomove((caddr_t)&d, UIO_MX, uio)) != 0)
break;
- if (ncookies-- > 0)
- *cookies++ = i + 1;
}
done: