diff options
author | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-03-20 18:59:50 (GMT) |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-03-20 18:59:50 (GMT) |
commit | 44e8ba93cf330f075178e31759100f367313790a (patch) | |
tree | 27956beb159bfb603d672b43cb207690a087dd0a /fs/dcache.c | |
parent | e9fe8a714e450b26f76eaf8832f5b9fe24d00e79 (diff) | |
parent | c16fa4f2ad19908a47c63d8fa436a1178438c7e7 (diff) | |
download | linux-fsl-qoriq-44e8ba93cf330f075178e31759100f367313790a.tar.xz |
Merge commit 'v3.3' into fbdev-next
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 138be96..bcbdb33 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, } #endif +/* + * Compare 2 name strings, return 0 if they match, otherwise non-zero. + * The strings are both count bytes long, and count is non-zero. + */ +static inline int dentry_cmp(const unsigned char *cs, size_t scount, + const unsigned char *ct, size_t tcount) +{ + if (scount != tcount) + return 1; + + do { + if (*cs != *ct) + return 1; + cs++; + ct++; + tcount--; + } while (tcount); + return 0; +} + static void __d_free(struct rcu_head *head) { struct dentry *dentry = container_of(head, struct dentry, d_u.d_rcu); |