aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dcache.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/dcache.h')
-rw-r--r--include/linux/dcache.h33
1 files changed, 3 insertions, 30 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index d64a55b23afd..ff5f5256d175 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -47,27 +47,6 @@ struct dentry_stat_t {
47}; 47};
48extern struct dentry_stat_t dentry_stat; 48extern struct dentry_stat_t dentry_stat;
49 49
50/*
51 * Compare 2 name strings, return 0 if they match, otherwise non-zero.
52 * The strings are both count bytes long, and count is non-zero.
53 */
54static inline int dentry_cmp(const unsigned char *cs, size_t scount,
55 const unsigned char *ct, size_t tcount)
56{
57 int ret;
58 if (scount != tcount)
59 return 1;
60 do {
61 ret = (*cs != *ct);
62 if (ret)
63 break;
64 cs++;
65 ct++;
66 tcount--;
67 } while (tcount);
68 return ret;
69}
70
71/* Name hashing routines. Initial hash value */ 50/* Name hashing routines. Initial hash value */
72/* Hash courtesy of the R5 hash in reiserfs modulo sign bits */ 51/* Hash courtesy of the R5 hash in reiserfs modulo sign bits */
73#define init_name_hash() 0 52#define init_name_hash() 0
@@ -89,14 +68,7 @@ static inline unsigned long end_name_hash(unsigned long hash)
89} 68}
90 69
91/* Compute the hash for a name string. */ 70/* Compute the hash for a name string. */
92static inline unsigned int 71extern unsigned int full_name_hash(const unsigned char *, unsigned int);
93full_name_hash(const unsigned char *name, unsigned int len)
94{
95 unsigned long hash = init_name_hash();
96 while (len--)
97 hash = partial_name_hash(*name++, hash);
98 return end_name_hash(hash);
99}
100 72
101/* 73/*
102 * Try to keep struct dentry aligned on 64 byte cachelines (this will 74 * Try to keep struct dentry aligned on 64 byte cachelines (this will
@@ -309,7 +281,8 @@ extern struct dentry *d_ancestor(struct dentry *, struct dentry *);
309extern struct dentry *d_lookup(struct dentry *, struct qstr *); 281extern struct dentry *d_lookup(struct dentry *, struct qstr *);
310extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *); 282extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *);
311extern struct dentry *__d_lookup(struct dentry *, struct qstr *); 283extern struct dentry *__d_lookup(struct dentry *, struct qstr *);
312extern struct dentry *__d_lookup_rcu(struct dentry *parent, struct qstr *name, 284extern struct dentry *__d_lookup_rcu(const struct dentry *parent,
285 const struct qstr *name,
313 unsigned *seq, struct inode **inode); 286 unsigned *seq, struct inode **inode);
314 287
315/** 288/**