diff options
Diffstat (limited to 'fs/dcache.c')
-rw-r--r-- | fs/dcache.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index 138be96e25b6..bcbdb33fcc20 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
@@ -137,6 +137,26 @@ int proc_nr_dentry(ctl_table *table, int write, void __user *buffer, | |||
137 | } | 137 | } |
138 | #endif | 138 | #endif |
139 | 139 | ||
140 | /* | ||
141 | * Compare 2 name strings, return 0 if they match, otherwise non-zero. | ||
142 | * The strings are both count bytes long, and count is non-zero. | ||
143 | */ | ||
144 | static inline int dentry_cmp(const unsigned char *cs, size_t scount, | ||
145 | const unsigned char *ct, size_t tcount) | ||
146 | { | ||
147 | if (scount != tcount) | ||
148 | return 1; | ||
149 | |||
150 | do { | ||
151 | if (*cs != *ct) | ||
152 | return 1; | ||
153 | cs++; | ||
154 | ct++; | ||
155 | tcount--; | ||
156 | } while (tcount); | ||
157 | return 0; | ||
158 | } | ||
159 | |||
140 | static void __d_free(struct rcu_head *head) | 160 | static void __d_free(struct rcu_head *head) |
141 | { | 161 | { |
142 | struct dentry *dentry = container_of(head, struct dentry, d_u.d_rcu); | 162 | struct dentry *dentry = container_of(head, struct dentry, d_u.d_rcu); |