From 29a6b88a1badf78ac2b9d82e9f50aba863297548 Mon Sep 17 00:00:00 2001 From: braam Date: Thu, 7 Nov 2002 04:03:40 +0000 Subject: [PATCH] another shot at managing dentries --- lustre/llite/namei.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/lustre/llite/namei.c b/lustre/llite/namei.c index e690251..ec8dae8 100644 --- a/lustre/llite/namei.c +++ b/lustre/llite/namei.c @@ -381,17 +381,11 @@ struct dentry *ll_find_alias(struct inode *inode, struct dentry *de) struct dentry *dentry = list_entry(tmp, struct dentry, d_alias); /* We are called here with 'de' already on the aliases list. */ - if (dentry == de) - continue; - - if (!atomic_read(&dentry->d_count)) { - iput(inode); + if (dentry == de) { + CERROR("whoops\n"); continue; } - if (!list_empty(&dentry->d_lru)) - continue; - if (dentry->d_parent != de->d_parent) continue; @@ -402,8 +396,10 @@ struct dentry *ll_find_alias(struct inode *inode, struct dentry *de) de->d_name.len) != 0) continue; - list_del_init(&dentry->d_hash); + if (!list_empty(&dentry->d_lru)) + list_del_init(&dentry->d_lru); + list_del_init(&dentry->d_hash); spin_unlock(&dcache_lock); d_rehash(dentry); atomic_inc(&dentry->d_count); -- 1.8.3.1