Re: [PATCH/RFC] Lustre VFS patch

From: hch
Date: Mon May 24 2004 - 07:07:37 EST


> 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);
+}
+
+EXPORT_SYMBOL(__d_rehash);

looks okay as change but explanation is missing.

+EXPORT_SYMBOL(__d_move);
+
+void d_move(struct dentry *dentry, struct dentry *target)
+{
+ spin_lock(&dcache_lock);
+ __d_move(dentry, target);
spin_unlock(&dcache_lock);
}

dito.

-
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/