diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2008-11-04 19:04:01 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2008-11-04 19:04:01 +0000 |
| commit | 2ff47c5f181b6ccf2ad64d3552687e28781eab5a (patch) | |
| tree | b47a8cae4ebd0444298548735180256fabe8a0d6 /sys/fs/procfs | |
| parent | 2ef42c06d66bc2811c37c7041142338efcab4b73 (diff) | |
Notes
Diffstat (limited to 'sys/fs/procfs')
| -rw-r--r-- | sys/fs/procfs/procfs.c | 12 | ||||
| -rw-r--r-- | sys/fs/procfs/procfs_map.c | 5 |
2 files changed, 6 insertions, 11 deletions
diff --git a/sys/fs/procfs/procfs.c b/sys/fs/procfs/procfs.c index bc0efdaa2f61a..26bd18532f8e2 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); diff --git a/sys/fs/procfs/procfs_map.c b/sys/fs/procfs/procfs_map.c index 1a9e4aaa8b804..0c671b4c286cd 100644 --- a/sys/fs/procfs/procfs_map.c +++ b/sys/fs/procfs/procfs_map.c @@ -175,10 +175,9 @@ procfs_doprocmap(PFS_FILL_ARGS) shadow_count = obj->shadow_count; VM_OBJECT_UNLOCK(obj); if (vp != NULL) { - vfslocked = VFS_LOCK_GIANT(vp->v_mount); - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); vn_fullpath(td, vp, &fullpath, &freepath); - vput(vp); + vfslocked = VFS_LOCK_GIANT(vp->v_mount); + vrele(vp); VFS_UNLOCK_GIANT(vfslocked); } } else { |
