diff options
| author | Maneesh Soni <maneesh@in.ibm.com> | 2002-11-17 16:34:50 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-11-17 16:34:50 -0800 |
| commit | 3a70869407b8798fb6170fdcaae5ee90d3477478 (patch) | |
| tree | c68bdfa94a9a777256f541abe879085da1a02475 /kernel | |
| parent | 1cef72646b78f106c0e37df69e88efc9aab01eba (diff) | |
[PATCH] dcache usage cleanups
This cleans up the dcache code to always use the proper dcache functions
(d_unhashed and __d_drop) instead of accessing the dentry lists
directly.
In other words: use "d_unhashed(dentry)" instead of doing a manual
"list_empty(&dentry->d_hash)" test. And use "__d_drop(dentry)" instead
of doing "list_del_init(&dentry->d_hash)" by hand.
This will help the dcache-rcu patches.
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/exit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 038da036771b..b923fd64591b 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -47,9 +47,9 @@ static struct dentry * __unhash_process(struct task_struct *p) proc_dentry = p->proc_dentry; if (unlikely(proc_dentry != NULL)) { spin_lock(&dcache_lock); - if (!list_empty(&proc_dentry->d_hash)) { + if (!d_unhashed(proc_dentry)) { dget_locked(proc_dentry); - list_del_init(&proc_dentry->d_hash); + __d_drop(proc_dentry); } else proc_dentry = NULL; spin_unlock(&dcache_lock); |
