diff options
author | bp <bp@FreeBSD.org> | 1999-11-27 17:46:04 +0000 |
---|---|---|
committer | bp <bp@FreeBSD.org> | 1999-11-27 17:46:04 +0000 |
commit | dc2c10cce6de08ff32a8a4e44eb00db4e49076bb (patch) | |
tree | d65cc3882cccc748894328781d0c6bd9b725e8ea /sys/fs | |
parent | 507edabe7f939ff34cc5965dec8076436aee12d6 (diff) | |
download | FreeBSD-src-dc2c10cce6de08ff32a8a4e44eb00db4e49076bb.zip FreeBSD-src-dc2c10cce6de08ff32a8a4e44eb00db4e49076bb.tar.gz |
Remove abuse of struct nameidata.
Pointed by: Eivind Eklund
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/nwfs/nwfs_io.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/fs/nwfs/nwfs_io.c b/sys/fs/nwfs/nwfs_io.c index 1187ae3..d634cbc 100644 --- a/sys/fs/nwfs/nwfs_io.c +++ b/sys/fs/nwfs/nwfs_io.c @@ -81,8 +81,7 @@ nwfs_readvdir(struct vnode *vp, struct uio *uio, struct ucred *cred) { struct nwnode *np = VTONW(vp); struct nw_entry_info fattr; struct vnode *newvp; - struct nameidata nami, *ndp = &nami; - struct componentname *cnp = &ndp->ni_cnd; + struct componentname cn; ncpfid fid; np = VTONW(vp); @@ -91,7 +90,6 @@ nwfs_readvdir(struct vnode *vp, struct uio *uio, struct ucred *cred) { return (EINVAL); error = 0; count = 0; - ndp->ni_dvp = vp; i = uio->uio_offset / DE_SIZE; /* offset in directory */ if (i == 0) { error = ncp_initsearch(vp, uio->uio_procp, cred); @@ -137,10 +135,9 @@ nwfs_readvdir(struct vnode *vp, struct uio *uio, struct ucred *cred) { error = nwfs_nget(vp->v_mount, fid, &fattr, vp, &newvp); if (!error) { VTONW(newvp)->n_ctime = VTONW(newvp)->n_vattr.va_ctime.tv_sec; - cnp->cn_nameptr = dp.d_name; - cnp->cn_namelen = dp.d_namlen; - ndp->ni_vp = newvp; - cache_enter(ndp->ni_dvp, ndp->ni_vp, cnp); + cn.cn_nameptr = dp.d_name; + cn.cn_namelen = dp.d_namlen; + cache_enter(vp, newvp, &cn); vput(newvp); } else error = 0; |