])
])
+AC_DEFUN([LC_EXPORT_D_MOVE_LOCKED],
+[LB_CHECK_SYMBOL_EXPORT([d_move_locked],
+[fs/dcache.c],[
+AC_DEFINE(HAVE_D_MOVE_LOCKED, 1,
+ [d_move_locked is exported by the kernel])
+],[
+])
+])
+
+AC_DEFUN([LC_EXPORT___D_MOVE],
+[LB_CHECK_SYMBOL_EXPORT([__d_move],
+[fs/dcache.c],[
+AC_DEFINE(HAVE___D_MOVE, 1,
+ [__d_move is exported by the kernel])
+],[
+])
+])
+
# The actual symbol exported varies among architectures, so we need
# to check many symbols (but only in the current architecture.) No
# matter what symbol is exported, the kernel #defines node_to_cpumask
LC_EXPORT_TRUNCATE_COMPLETE
LC_EXPORT_D_REHASH_COND
LC_EXPORT___D_REHASH
+ LC_EXPORT_D_MOVE_LOCKED
+ LC_EXPORT___D_MOVE
LC_EXPORT_NODE_TO_CPUMASK
LC_STRUCT_KIOBUF
#include <linux/proc_fs.h>
-#ifndef HAVE___D_REHASH
-#define __d_rehash(dentry, lock) d_rehash_cond(dentry, lock)
+#if !defined(HAVE_D_REHASH_COND) && defined(HAVE___D_REHASH)
+#define d_rehash_cond(dentry, lock) __d_rehash(dentry, lock)
+extern void __d_rehash(struct dentry *dentry, int lock);
+#endif
+
+#if !defined(HAVE_D_MOVE_LOCKED) && defined(HAVE___D_MOVE)
+#define d_move_locked(dentry, target) __d_move(dentry, target)
+extern void __d_move(struct dentry *dentry, struct dentry *target);
#endif
#ifdef HAVE_CAN_SLEEP_ARG
*/
-void d_move(struct dentry * dentry, struct dentry * target)
-+void __d_move(struct dentry * dentry, struct dentry * target)
++void d_move_locked(struct dentry * dentry, struct dentry * target)
{
struct hlist_head *list;
write_sequnlock(&rename_lock);
+}
+
-+EXPORT_SYMBOL(__d_move);
++EXPORT_SYMBOL(d_move_locked);
+
+void d_move(struct dentry *dentry, struct dentry *target)
+{
+ spin_lock(&dcache_lock);
-+ __d_move(dentry, target);
++ d_move_locked(dentry, target);
spin_unlock(&dcache_lock);
}
* This adds the entry to the hash queues.
*/
extern void d_rehash(struct dentry *);
-+extern void __d_rehash(struct dentry *, int lock);
++extern void d_rehash_cond(struct dentry *, int lock);
/**
* d_add - add dentry to hash queues
/* used for rename() and baskets */
extern void d_move(struct dentry *, struct dentry *);
-+extern void __d_move(struct dentry *, struct dentry *);
++extern void d_move_locked(struct dentry *, struct dentry *);
/* appendix may either be NULL or be used for transname suffixes */
extern struct dentry * d_lookup(struct dentry *, struct qstr *);
*/
-void d_move(struct dentry * dentry, struct dentry * target)
-+void __d_move(struct dentry * dentry, struct dentry * target)
++void d_move_locked(struct dentry * dentry, struct dentry * target)
{
struct hlist_head *list;
write_sequnlock(&rename_lock);
+}
+
-+EXPORT_SYMBOL(__d_move);
++EXPORT_SYMBOL(d_move_locked);
+
+void d_move(struct dentry *dentry, struct dentry *target)
+{
+ spin_lock(&dcache_lock);
-+ __d_move(dentry, target);
++ d_move_locked(dentry, target);
spin_unlock(&dcache_lock);
}
/* used for rename() and baskets */
extern void d_move(struct dentry *, struct dentry *);
-+extern void __d_move(struct dentry *, struct dentry *);
++extern void d_move_locked(struct dentry *, struct dentry *);
/* appendix may either be NULL or be used for transname suffixes */
extern struct dentry * d_lookup(struct dentry *, struct qstr *);
*/
-void d_move(struct dentry * dentry, struct dentry * target)
-+void __d_move(struct dentry * dentry, struct dentry * target)
++void d_move_locked(struct dentry * dentry, struct dentry * target)
{
struct hlist_head *list;
write_sequnlock(&rename_lock);
+}
+
-+EXPORT_SYMBOL(__d_move);
++EXPORT_SYMBOL(d_move_locked);
+
+void d_move(struct dentry *dentry, struct dentry *target)
+{
+ spin_lock(&dcache_lock);
-+ __d_move(dentry, target);
++ d_move_locked(dentry, target);
spin_unlock(&dcache_lock);
}
/* used for rename() and baskets */
extern void d_move(struct dentry *, struct dentry *);
-+extern void __d_move(struct dentry *, struct dentry *);
++extern void d_move_locked(struct dentry *, struct dentry *);
/* appendix may either be NULL or be used for transname suffixes */
extern struct dentry * d_lookup(struct dentry *, struct qstr *);
===================================================================
--- linux-2.6.11.orig/fs/dcache.c 2005-04-13 22:44:37.698760922 -0400
+++ linux-2.6.11/fs/dcache.c 2005-04-13 22:44:50.482498026 -0400
-@@ -1183,7 +1183,7 @@
- spin_unlock(&dcache_lock);
- }
-
--static void __d_rehash(struct dentry * entry, struct hlist_head *list)
-+static void __d_rehash_internal(struct dentry * entry, struct hlist_head *list)
- {
-
- entry->d_flags &= ~DCACHE_UNHASHED;
@@ -1197,15 +1197,24 @@
* Adds a dentry to the hash according to its name.
*/
-void d_rehash(struct dentry * entry)
-+void __d_rehash(struct dentry * entry, int lock)
++void d_rehash_cond(struct dentry * entry, int lock)
{
struct hlist_head *list = d_hash(entry->d_parent, entry->d_name.hash);
+ if (lock)
+ spin_lock(&dcache_lock);
spin_lock(&entry->d_lock);
-- __d_rehash(entry, list);
-+ __d_rehash_internal(entry, list);
+ __d_rehash(entry, list);
spin_unlock(&entry->d_lock);
- spin_unlock(&dcache_lock);
+ if (lock)
+ spin_unlock(&dcache_lock);
+}
+
-+EXPORT_SYMBOL(__d_rehash);
++EXPORT_SYMBOL(d_rehash_cond);
+
+void d_rehash(struct dentry * entry)
+{
-+ __d_rehash(entry, 1);
++ d_rehash_cond(entry, 1);
}
#define do_switch(x,y) do { \
-@@ -1308,7 +1317,7 @@
-
- already_unhashed:
- list = d_hash(target->d_parent, target->d_name.hash);
-- __d_rehash(dentry, list);
-+ __d_rehash_internal(dentry, list);
-
- /* Unhash the target: dput() will then get rid of it */
- __d_drop(target);
Index: linux-2.6.11/include/linux/dcache.h
===================================================================
--- linux-2.6.11.orig/include/linux/dcache.h 2005-04-13 22:35:23.515178600 -0400
extern spinlock_t dcache_lock;
+@@ -254,6 +255,7 @@ extern int have_submounts(struct dentry
+ * This adds the entry to the hash queues.
+ */
+ extern void d_rehash(struct dentry *);
++extern void d_rehash_cond(struct dentry *, int lock);
+
+ /**
+ * d_add - add dentry to hash queues
extern spinlock_t dcache_lock;
+@@ -254,6 +255,7 @@ extern int have_submounts(struct dentry
+ * This adds the entry to the hash queues.
+ */
+ extern void d_rehash(struct dentry *);
++extern void d_rehash_cond(struct dentry *, int lock);
+
+ /**
+ * d_add - add dentry to hash queues
#define DCACHE_INOTIFY_PARENT_WATCHED 0x0020 /* Parent inode is watched */
+@@ -254,6 +255,7 @@ extern int have_submounts(struct dentry
+ * This adds the entry to the hash queues.
+ */
+ extern void d_rehash(struct dentry *);
++extern void d_rehash_cond(struct dentry *, int lock);
+
+ /**
+ * d_add - add dentry to hash queues
lustre_version.patch
jbd-2.6.10-jcberr.patch
+iopen-misc-2.6.12.patch
export_symbols-2.6.12.patch
dev_read_only-2.6-fc5.patch
export-2.6-fc5.patch
lock_dentry(de);
__d_drop(de);
unlock_dentry(de);
- __d_rehash(de, 0);
+ d_rehash_cond(de, 0);
spin_unlock(&dcache_lock);
out:
#define ll_s2sbi(sb) (s2lsi(sb)->lsi_llsbi)
-void __d_rehash(struct dentry * entry, int lock);
static inline __u64 ll_ts2u64(struct timespec *time)
{
__u64 t = time->tv_sec;
de->d_name.len, de->d_name.name, de, de->d_hash.next);
LBUG();
}
- __d_rehash(de, 0);
+ d_rehash_cond(de, 0);
}
/* Search "inode"'s alias list for a dentry that has the same name and parent
dentry->d_flags &= ~DCACHE_LUSTRE_INVALID;
#endif
unlock_dentry(dentry);
- __d_rehash(dentry, 0); /* avoid taking dcache_lock inside */
+ d_rehash_cond(dentry, 0); /* avoid taking dcache_lock inside */
spin_unlock(&dcache_lock);
iput(inode);
CDEBUG(D_DENTRY, "alias dentry %.*s (%p) parent %p inode %p "
* successful create. Hash it here. */
spin_lock(&dcache_lock);
if (d_unhashed(dentry))
- __d_rehash(dentry, 0);
+ d_rehash_cond(dentry, 0);
spin_unlock(&dcache_lock);
RETURN(0);
}