Re: [PATCH/RFC] Lustre VFS patch

From: Horst von Brand
Date: Mon May 24 2004 - 10:36:56 EST


hch@xxxxxxxxxxxxx said:
> > vfs-dcache_locking-vanilla-2.6.patch
> >
> > A trivial patch to make functions available to lustre that do
> > d_move, d_rehash, without taking/dropping the dcache lock.
>
>
> -void d_rehash(struct dentry * entry)
> +void __d_rehash(struct dentry * entry)
> {
> struct hlist_head *list = d_hash(entry->d_parent, entry->d_name.hash);
> - spin_lock(&dcache_lock);
> entry->d_vfs_flags &= ~DCACHE_UNHASHED;
> entry->d_bucket = list;
> hlist_add_head_rcu(&entry->d_hash, list);
> +}

Won't you also need a non-__ version, perhaps like so:

void d_rehash(struct dentry *entry)
{
spin_lock(&dcache_lock);
__d_rehash(entry);
spin_unlock(&dcache_lock);
}
EXPORT_SYMBOL(d_rehash);

?

Signed-off-by: Horst H. von Brand <vonbrand@xxxxxxxxxxxx>

(Surely such a triviality doesn't need this, but...)
--
Dr. Horst H. von Brand User #22616 counter.li.org
Departamento de Informatica Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria +56 32 654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/