diff options
author | Ingo Molnar <mingo@elte.hu> | 2012-03-13 11:26:52 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2012-03-13 11:26:52 -0400 |
commit | 47258cf3c4aa5d56e678bafe0dd0d03ddd980b88 (patch) | |
tree | 4856f0fb1185ba97f320a7ed6fb63bf136708a42 /include/linux/dcache.h | |
parent | c308b56b5398779cd3da0f62ab26b0453494c3d4 (diff) | |
parent | fde7d9049e55ab85a390be7f415d74c9f62dd0f9 (diff) |
Merge tag 'v3.3-rc7' into sched/core
Merge reason: merge back final fixes, prepare for the merge window.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/dcache.h')
-rw-r--r-- | include/linux/dcache.h | 33 |
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 | }; |
48 | extern struct dentry_stat_t dentry_stat; | 48 | extern 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 | */ | ||
54 | static 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. */ |
92 | static inline unsigned int | 71 | 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 | 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 *); | |||
309 | extern struct dentry *d_lookup(struct dentry *, struct qstr *); | 281 | extern struct dentry *d_lookup(struct dentry *, struct qstr *); |
310 | extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *); | 282 | extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *); |
311 | extern struct dentry *__d_lookup(struct dentry *, struct qstr *); | 283 | extern struct dentry *__d_lookup(struct dentry *, struct qstr *); |
312 | extern struct dentry *__d_lookup_rcu(struct dentry *parent, struct qstr *name, | 284 | extern 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 | /** |