Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288161
b: refs/heads/master
c: 5483f18
h: refs/heads/master
i:
  288159: 599e675
v: v3
  • Loading branch information
Linus Torvalds committed Mar 4, 2012
1 parent d092b97 commit 0633f59
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 192cfd58774b4d17b2fe8bdc77d89c2ef4e0591d
refs/heads/master: 5483f18e986ed5267b923bec12b407845181350b
20 changes: 20 additions & 0 deletions trunk/fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
20 changes: 0 additions & 20 deletions trunk/include/linux/dcache.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,6 @@ struct dentry_stat_t {
};
extern struct dentry_stat_t dentry_stat;

/*
* 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;
}

/* Name hashing routines. Initial hash value */
/* Hash courtesy of the R5 hash in reiserfs modulo sign bits */
#define init_name_hash() 0
Expand Down

0 comments on commit 0633f59

Please sign in to comment.