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.h34
1 files changed, 3 insertions, 31 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index d64a55b23afd..7e11f1418203 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
@@ -250,7 +222,6 @@ extern void shrink_dcache_for_umount(struct super_block *);
250extern int d_invalidate(struct dentry *); 222extern int d_invalidate(struct dentry *);
251 223
252/* only used at mount-time */ 224/* only used at mount-time */
253extern struct dentry * d_alloc_root(struct inode *);
254extern struct dentry * d_make_root(struct inode *); 225extern struct dentry * d_make_root(struct inode *);
255 226
256/* <clickety>-<click> the ramfs-type tree */ 227/* <clickety>-<click> the ramfs-type tree */
@@ -309,7 +280,8 @@ extern struct dentry *d_ancestor(struct dentry *, struct dentry *);
309extern struct dentry *d_lookup(struct dentry *, struct qstr *); 280extern struct dentry *d_lookup(struct dentry *, struct qstr *);
310extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *); 281extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *);
311extern struct dentry *__d_lookup(struct dentry *, struct qstr *); 282extern struct dentry *__d_lookup(struct dentry *, struct qstr *);
312extern struct dentry *__d_lookup_rcu(struct dentry *parent, struct qstr *name, 283extern struct dentry *__d_lookup_rcu(const struct dentry *parent,
284 const struct qstr *name,
313 unsigned *seq, struct inode **inode); 285 unsigned *seq, struct inode **inode);
314 286
315/** 287/**