diff options
author | des <des@FreeBSD.org> | 2002-07-31 12:19:49 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2002-07-31 12:19:49 +0000 |
commit | 3562e9781922827a5053317c2ecd89cf8da93ff3 (patch) | |
tree | 8895b6491e9be59df954e6ec8571d1cd5b856c84 /sys/kern/vfs_vnops.c | |
parent | 43aa4c758e77b281df2f306b5025c1ea7e0030c0 (diff) | |
download | FreeBSD-src-3562e9781922827a5053317c2ecd89cf8da93ff3.zip FreeBSD-src-3562e9781922827a5053317c2ecd89cf8da93ff3.tar.gz |
Introduce struct xvnode, which will be used instead of struct vnode for
sysctl purposes. Also add two fields to struct vnode, v_cachedfs and
v_cachedid, which hold the vnode's device and file id and are filled in
by vn_open_cred() and vn_stat().
Sponsored by: DARPA, NAI Labs
Diffstat (limited to 'sys/kern/vfs_vnops.c')
-rw-r--r-- | sys/kern/vfs_vnops.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 218dd72..c759196 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -209,6 +209,10 @@ restart: goto bad; } } + if ((error = VOP_GETATTR(vp, vap, cred, td)) == 0) { + vp->v_cachedfs = vap->va_fsid; + vp->v_cachedid = vap->va_fileid; + } if ((error = VOP_OPEN(vp, fmode, cred, td)) != 0) goto bad; /* @@ -567,6 +571,9 @@ vn_stat(vp, sb, td) if (error) return (error); + vp->v_cachedfs = vap->va_fsid; + vp->v_cachedid = vap->va_fileid; + /* * Zero the spare stat fields */ |