diff options
Diffstat (limited to 'include/linux/dcache.h')
-rw-r--r-- | include/linux/dcache.h | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index d64a55b23afd..4270bedd2308 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -54,18 +54,17 @@ extern struct dentry_stat_t dentry_stat; | |||
54 | static inline int dentry_cmp(const unsigned char *cs, size_t scount, | 54 | static inline int dentry_cmp(const unsigned char *cs, size_t scount, |
55 | const unsigned char *ct, size_t tcount) | 55 | const unsigned char *ct, size_t tcount) |
56 | { | 56 | { |
57 | int ret; | ||
58 | if (scount != tcount) | 57 | if (scount != tcount) |
59 | return 1; | 58 | return 1; |
59 | |||
60 | do { | 60 | do { |
61 | ret = (*cs != *ct); | 61 | if (*cs != *ct) |
62 | if (ret) | 62 | return 1; |
63 | break; | ||
64 | cs++; | 63 | cs++; |
65 | ct++; | 64 | ct++; |
66 | tcount--; | 65 | tcount--; |
67 | } while (tcount); | 66 | } while (tcount); |
68 | return ret; | 67 | return 0; |
69 | } | 68 | } |
70 | 69 | ||
71 | /* Name hashing routines. Initial hash value */ | 70 | /* Name hashing routines. Initial hash value */ |
@@ -89,14 +88,7 @@ static inline unsigned long end_name_hash(unsigned long hash) | |||
89 | } | 88 | } |
90 | 89 | ||
91 | /* Compute the hash for a name string. */ | 90 | /* Compute the hash for a name string. */ |
92 | static inline unsigned int | 91 | extern unsigned int full_name_hash(const unsigned char *, unsigned int); |
93 | full_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 | 92 | ||
101 | /* | 93 | /* |
102 | * Try to keep struct dentry aligned on 64 byte cachelines (this will | 94 | * Try to keep struct dentry aligned on 64 byte cachelines (this will |
@@ -309,7 +301,8 @@ extern struct dentry *d_ancestor(struct dentry *, struct dentry *); | |||
309 | extern struct dentry *d_lookup(struct dentry *, struct qstr *); | 301 | extern struct dentry *d_lookup(struct dentry *, struct qstr *); |
310 | extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *); | 302 | extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *); |
311 | extern struct dentry *__d_lookup(struct dentry *, struct qstr *); | 303 | extern struct dentry *__d_lookup(struct dentry *, struct qstr *); |
312 | extern struct dentry *__d_lookup_rcu(struct dentry *parent, struct qstr *name, | 304 | extern struct dentry *__d_lookup_rcu(const struct dentry *parent, |
305 | const struct qstr *name, | ||
313 | unsigned *seq, struct inode **inode); | 306 | unsigned *seq, struct inode **inode); |
314 | 307 | ||
315 | /** | 308 | /** |