From: braam Date: Thu, 7 Nov 2002 04:03:40 +0000 (+0000) Subject: another shot at managing dentries X-Git-Tag: 0.5.16~7 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=29a6b88a1badf78ac2b9d82e9f50aba863297548;p=fs%2Flustre-release.git another shot at managing dentries --- 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);