diff options
author | Eric Dumazet <dada1@cosmosbay.com> | 2006-12-07 05:38:49 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 17:39:41 +0100 |
commit | 304e61e6fbadec586dfe002b535f169a04248e49 (patch) | |
tree | b70c8ec7ca6b538b5d02f3c5372a35268643a5bf /kernel/extable.c | |
parent | [PATCH] dcache: avoid RCU for never-hashed dentries (diff) | |
download | linux-304e61e6fbadec586dfe002b535f169a04248e49.tar.xz linux-304e61e6fbadec586dfe002b535f169a04248e49.zip |
[PATCH] net: don't insert socket dentries into dentry_hashtable
We currently insert socket dentries into the global dentry hashtable. This
is suboptimal because there is currently no way these entries can be used
for a lookup(). (/proc/xxx/fd/xxx uses a different mechanism). Inserting
them in dentry hashtable slows dcache lookups.
To let __dpath() still work correctly (ie not adding a " (deleted)") after
dentry name, we do :
- Right after d_alloc(), pretend they are hashed by clearing the
DCACHE_UNHASHED bit.
- Call d_instantiate() instead of d_add() : dentry is not inserted in
hash table.
__dpath() & friends work as intended during dentry lifetime.
- At dismantle time, once dput() must clear the dentry, setting again
DCACHE_UNHASHED bit inside the custom d_delete() function provided by
socket code, so that dput() can just kill_it.
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/extable.c')
0 files changed, 0 insertions, 0 deletions