summaryrefslogtreecommitdiffstats
path: root/sys/fs/procfs/procfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/procfs/procfs.c')
-rw-r--r--sys/fs/procfs/procfs.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/fs/procfs/procfs.c b/sys/fs/procfs/procfs.c
index bc0efda..26bd185 100644
--- a/sys/fs/procfs/procfs.c
+++ b/sys/fs/procfs/procfs.c
@@ -70,17 +70,13 @@ procfs_doprocfile(PFS_FILL_ARGS)
char *fullpath = "unknown";
char *freepath = NULL;
struct vnode *textvp;
- int err;
+ PROC_LOCK(p);
textvp = p->p_textvp;
- VI_LOCK(textvp);
- vholdl(textvp);
- err = vn_lock(textvp, LK_EXCLUSIVE | LK_INTERLOCK);
- vdrop(textvp);
- if (err)
- return (err);
+ vhold(textvp);
+ PROC_UNLOCK(p);
vn_fullpath(td, textvp, &fullpath, &freepath);
- VOP_UNLOCK(textvp, 0);
+ vdrop(textvp);
sbuf_printf(sb, "%s", fullpath);
if (freepath)
free(freepath, M_TEMP);
OpenPOWER on IntegriCloud