aboutsummaryrefslogtreecommitdiff
path: root/sys/nwfs
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1999-10-03 12:18:29 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1999-10-03 12:18:29 +0000
commit3b6fb88590bce72fcdbf17c09a593f5efb7bff24 (patch)
treef95a6bb13e249a22422668c68d40767ae08b9eaf /sys/nwfs
parenta2e6dbb39d4518777780673f72c6b1e1a13d395a (diff)
downloadsrc-3b6fb88590bce72fcdbf17c09a593f5efb7bff24.tar.gz
src-3b6fb88590bce72fcdbf17c09a593f5efb7bff24.zip
Before we start to mess with the VFS name-cache clean things up a little bit:
Isolate the namecache in its own file, and give it a dedicated malloc type.
Notes
Notes: svn path=/head/; revision=51906
Diffstat (limited to 'sys/nwfs')
-rw-r--r--sys/nwfs/nwfs_io.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/nwfs/nwfs_io.c b/sys/nwfs/nwfs_io.c
index 21339b39e89e..84f702da2ce2 100644
--- a/sys/nwfs/nwfs_io.c
+++ b/sys/nwfs/nwfs_io.c
@@ -86,7 +86,7 @@ extern int nwfs_pbuf_freecnt;
static int
nwfs_readvdir(struct vnode *vp, struct uio *uio, struct ucred *cred) {
struct nwmount *nmp = VTONWFS(vp);
- int error, count, i, len;
+ int error, count, i;
struct dirent dp;
struct nwnode *np = VTONW(vp);
struct nw_entry_info fattr;
@@ -94,7 +94,6 @@ nwfs_readvdir(struct vnode *vp, struct uio *uio, struct ucred *cred) {
struct nameidata nami, *ndp = &nami;
struct componentname *cnp = &ndp->ni_cnd;
ncpfid fid;
- u_char *cp;
np = VTONW(vp);
NCPVNDEBUG("dirname='%s'\n",np->n_name);
@@ -149,11 +148,7 @@ nwfs_readvdir(struct vnode *vp, struct uio *uio, struct ucred *cred) {
if (!error) {
VTONW(newvp)->n_ctime = VTONW(newvp)->n_vattr.va_ctime.tv_sec;
cnp->cn_nameptr = dp.d_name;
- len = cnp->cn_namelen = dp.d_namlen;
ndp->ni_vp = newvp;
- cnp->cn_hash = 0;
- for (cp = cnp->cn_nameptr; len; len--, cp++)
- cnp->cn_hash += *cp;
cache_enter(ndp->ni_dvp, ndp->ni_vp, cnp);
vput(newvp);
} else