diff options
author | phk <phk@FreeBSD.org> | 1999-10-03 12:18:29 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-10-03 12:18:29 +0000 |
commit | 322edeeaa9db24f692a897cb4796b2fb096d1a2c (patch) | |
tree | ec3f444d06a5625603881122124496a55eaa80cb /sys/kern/vfs_lookup.c | |
parent | 0a9033ff881571171d2114a65ff650b7d69e1392 (diff) | |
download | FreeBSD-src-322edeeaa9db24f692a897cb4796b2fb096d1a2c.zip FreeBSD-src-322edeeaa9db24f692a897cb4796b2fb096d1a2c.tar.gz |
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.
Diffstat (limited to 'sys/kern/vfs_lookup.c')
-rw-r--r-- | sys/kern/vfs_lookup.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 39c46e8..18e0bda 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -297,16 +297,14 @@ dirloop: /* * Search a new directory. * - * The cn_hash value is for use by vfs_cache. * The last component of the filename is left accessible via * cnp->cn_nameptr for callers that need the name. Callers needing * the name set the SAVENAME flag. When done, they assume * responsibility for freeing the pathname buffer. */ cnp->cn_consume = 0; - cnp->cn_hash = 0; for (cp = cnp->cn_nameptr; *cp != 0 && *cp != '/'; cp++) - cnp->cn_hash += (unsigned char)*cp; + continue; cnp->cn_namelen = cp - cnp->cn_nameptr; if (cnp->cn_namelen > NAME_MAX) { error = ENAMETOOLONG; @@ -601,17 +599,12 @@ relookup(dvp, vpp, cnp) /* * Search a new directory. * - * The cn_hash value is for use by vfs_cache. * The last component of the filename is left accessible via * cnp->cn_nameptr for callers that need the name. Callers needing * the name set the SAVENAME flag. When done, they assume * responsibility for freeing the pathname buffer. */ #ifdef NAMEI_DIAGNOSTIC - for (newhash = 0, cp = cnp->cn_nameptr; *cp != 0 && *cp != '/'; cp++) - newhash += (unsigned char)*cp; - if (newhash != cnp->cn_hash) - panic("relookup: bad hash"); if (cnp->cn_namelen != cp - cnp->cn_nameptr) panic ("relookup: bad len"); if (*cp != 0) |