diff options
| author | Eric Dumazet <[email protected]> | 2006-12-06 20:38:49 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2006-12-07 08:39:41 -0800 |
| commit | 304e61e6fbadec586dfe002b535f169a04248e49 (patch) | |
| tree | b70c8ec7ca6b538b5d02f3c5372a35268643a5bf /scripts | |
| parent | b3423415fbc2e5461605826317da1c8dbbf21f97 (diff) | |
[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 <[email protected]>
Cc: Al Viro <[email protected]>
Acked-by: "David S. Miller" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions