diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-07 11:56:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-07 11:56:33 -0500 |
commit | b4a45f5fe8078bfc10837dbd5b98735058bc4698 (patch) | |
tree | df6f13a27610a3ec7eb4a661448cd779a8f84c79 /fs/hfs/string.c | |
parent | 01539ba2a706ab7d35fc0667dff919ade7f87d63 (diff) | |
parent | b3e19d924b6eaf2ca7d22cba99a517c5171007b6 (diff) |
Merge branch 'vfs-scale-working' of git://git.kernel.org/pub/scm/linux/kernel/git/npiggin/linux-npiggin
* 'vfs-scale-working' of git://git.kernel.org/pub/scm/linux/kernel/git/npiggin/linux-npiggin: (57 commits)
fs: scale mntget/mntput
fs: rename vfsmount counter helpers
fs: implement faster dentry memcmp
fs: prefetch inode data in dcache lookup
fs: improve scalability of pseudo filesystems
fs: dcache per-inode inode alias locking
fs: dcache per-bucket dcache hash locking
bit_spinlock: add required includes
kernel: add bl_list
xfs: provide simple rcu-walk ACL implementation
btrfs: provide simple rcu-walk ACL implementation
ext2,3,4: provide simple rcu-walk ACL implementation
fs: provide simple rcu-walk generic_check_acl implementation
fs: provide rcu-walk aware permission i_ops
fs: rcu-walk aware d_revalidate method
fs: cache optimise dentry and inode for rcu-walk
fs: dcache reduce branches in lookup path
fs: dcache remove d_mounted
fs: fs_struct use seqlock
fs: rcu-walk for path lookup
...
Diffstat (limited to 'fs/hfs/string.c')
-rw-r--r-- | fs/hfs/string.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/fs/hfs/string.c b/fs/hfs/string.c index 927a5af79428..495a976a3cc9 100644 --- a/fs/hfs/string.c +++ b/fs/hfs/string.c | |||
@@ -51,7 +51,8 @@ static unsigned char caseorder[256] = { | |||
51 | /* | 51 | /* |
52 | * Hash a string to an integer in a case-independent way | 52 | * Hash a string to an integer in a case-independent way |
53 | */ | 53 | */ |
54 | int hfs_hash_dentry(struct dentry *dentry, struct qstr *this) | 54 | int hfs_hash_dentry(const struct dentry *dentry, const struct inode *inode, |
55 | struct qstr *this) | ||
55 | { | 56 | { |
56 | const unsigned char *name = this->name; | 57 | const unsigned char *name = this->name; |
57 | unsigned int hash, len = this->len; | 58 | unsigned int hash, len = this->len; |
@@ -92,21 +93,21 @@ int hfs_strcmp(const unsigned char *s1, unsigned int len1, | |||
92 | * Test for equality of two strings in the HFS filename character ordering. | 93 | * Test for equality of two strings in the HFS filename character ordering. |
93 | * return 1 on failure and 0 on success | 94 | * return 1 on failure and 0 on success |
94 | */ | 95 | */ |
95 | int hfs_compare_dentry(struct dentry *dentry, struct qstr *s1, struct qstr *s2) | 96 | int hfs_compare_dentry(const struct dentry *parent, const struct inode *pinode, |
97 | const struct dentry *dentry, const struct inode *inode, | ||
98 | unsigned int len, const char *str, const struct qstr *name) | ||
96 | { | 99 | { |
97 | const unsigned char *n1, *n2; | 100 | const unsigned char *n1, *n2; |
98 | int len; | ||
99 | 101 | ||
100 | len = s1->len; | ||
101 | if (len >= HFS_NAMELEN) { | 102 | if (len >= HFS_NAMELEN) { |
102 | if (s2->len < HFS_NAMELEN) | 103 | if (name->len < HFS_NAMELEN) |
103 | return 1; | 104 | return 1; |
104 | len = HFS_NAMELEN; | 105 | len = HFS_NAMELEN; |
105 | } else if (len != s2->len) | 106 | } else if (len != name->len) |
106 | return 1; | 107 | return 1; |
107 | 108 | ||
108 | n1 = s1->name; | 109 | n1 = str; |
109 | n2 = s2->name; | 110 | n2 = name->name; |
110 | while (len--) { | 111 | while (len--) { |
111 | if (caseorder[*n1++] != caseorder[*n2++]) | 112 | if (caseorder[*n1++] != caseorder[*n2++]) |
112 | return 1; | 113 | return 1; |