diff options
author | njl <njl@FreeBSD.org> | 2002-09-14 09:02:28 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2002-09-14 09:02:28 +0000 |
commit | 0590c43070aac7fb636a1f4c4b94469046a317a0 (patch) | |
tree | e9205d0e4985af46af0db4bd26e9662b1c25f85b /sys/fs/pseudofs/pseudofs_vncache.c | |
parent | bb76739de046ae1f81a36e96d18f0ee3b1afd323 (diff) | |
download | FreeBSD-src-0590c43070aac7fb636a1f4c4b94469046a317a0.zip FreeBSD-src-0590c43070aac7fb636a1f4c4b94469046a317a0.tar.gz |
Remove all use of vnode->v_tag, replacing with appropriate substitutes.
v_tag is now const char * and should only be used for debugging.
Additionally:
1. All users of VT_NTS now check vfsconf->vf_type VFCF_NETWORK
2. The user of VT_PROCFS now checks for the new flag VV_PROCDEP, which
is propagated by pseudofs to all child vnodes if the fs sets PFS_PROCDEP.
Suggested by: phk
Reviewed by: bde, rwatson (earlier version)
Diffstat (limited to 'sys/fs/pseudofs/pseudofs_vncache.c')
-rw-r--r-- | sys/fs/pseudofs/pseudofs_vncache.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/fs/pseudofs/pseudofs_vncache.c b/sys/fs/pseudofs/pseudofs_vncache.c index 8d142e9..1239f12 100644 --- a/sys/fs/pseudofs/pseudofs_vncache.c +++ b/sys/fs/pseudofs/pseudofs_vncache.c @@ -135,7 +135,7 @@ pfs_vncache_alloc(struct mount *mp, struct vnode **vpp, MALLOC(pvd, struct pfs_vdata *, sizeof *pvd, M_PFSVNCACHE, M_WAITOK); if (++pfs_vncache_entries > pfs_vncache_maxentries) pfs_vncache_maxentries = pfs_vncache_entries; - error = getnewvnode(VT_PSEUDOFS, mp, pfs_vnodeop_p, vpp); + error = getnewvnode("pseudofs", mp, pfs_vnodeop_p, vpp); if (error) return (error); pvd->pvd_pn = pn; @@ -165,6 +165,12 @@ pfs_vncache_alloc(struct mount *mp, struct vnode **vpp, default: panic("%s has unexpected type: %d", pn->pn_name, pn->pn_type); } + /* + * Propagate flag through to vnode so users know it can change + * if the process changes (i.e. execve) + */ + if ((pn->pn_flags & PFS_PROCDEP) != 0) + (*vpp)->v_vflag |= VV_PROCDEP; pvd->pvd_vnode = *vpp; mtx_lock(&pfs_vncache_mutex); pvd->pvd_prev = NULL; |