@@ -43,7 +43,7 @@ affs_get_toupper(struct super_block *sb)
43
43
* Note: the dentry argument is the parent dentry.
44
44
*/
45
45
static inline int
46
- __affs_hash_dentry (const struct dentry * dentry , struct qstr * qstr , toupper_t toupper , bool notruncate )
46
+ __affs_hash_dentry (const struct dentry * dentry , struct qstr * qstr , toupper_t fn , bool notruncate )
47
47
{
48
48
const u8 * name = qstr -> name ;
49
49
unsigned long hash ;
@@ -57,7 +57,7 @@ __affs_hash_dentry(const struct dentry *dentry, struct qstr *qstr, toupper_t tou
57
57
hash = init_name_hash (dentry );
58
58
len = min (qstr -> len , AFFSNAMEMAX );
59
59
for (; len > 0 ; name ++ , len -- )
60
- hash = partial_name_hash (toupper (* name ), hash );
60
+ hash = partial_name_hash (fn (* name ), hash );
61
61
qstr -> hash = end_name_hash (hash );
62
62
63
63
return 0 ;
@@ -80,7 +80,7 @@ affs_intl_hash_dentry(const struct dentry *dentry, struct qstr *qstr)
80
80
}
81
81
82
82
static inline int __affs_compare_dentry (unsigned int len ,
83
- const char * str , const struct qstr * name , toupper_t toupper ,
83
+ const char * str , const struct qstr * name , toupper_t fn ,
84
84
bool notruncate )
85
85
{
86
86
const u8 * aname = str ;
@@ -106,7 +106,7 @@ static inline int __affs_compare_dentry(unsigned int len,
106
106
return 1 ;
107
107
108
108
for (; len > 0 ; len -- )
109
- if (toupper (* aname ++ ) != toupper (* bname ++ ))
109
+ if (fn (* aname ++ ) != fn (* bname ++ ))
110
110
return 1 ;
111
111
112
112
return 0 ;
@@ -135,7 +135,7 @@ affs_intl_compare_dentry(const struct dentry *dentry,
135
135
*/
136
136
137
137
static inline int
138
- affs_match (struct dentry * dentry , const u8 * name2 , toupper_t toupper )
138
+ affs_match (struct dentry * dentry , const u8 * name2 , toupper_t fn )
139
139
{
140
140
const u8 * name = dentry -> d_name .name ;
141
141
int len = dentry -> d_name .len ;
@@ -148,20 +148,20 @@ affs_match(struct dentry *dentry, const u8 *name2, toupper_t toupper)
148
148
return 0 ;
149
149
150
150
for (name2 ++ ; len > 0 ; len -- )
151
- if (toupper (* name ++ ) != toupper (* name2 ++ ))
151
+ if (fn (* name ++ ) != fn (* name2 ++ ))
152
152
return 0 ;
153
153
return 1 ;
154
154
}
155
155
156
156
int
157
157
affs_hash_name (struct super_block * sb , const u8 * name , unsigned int len )
158
158
{
159
- toupper_t toupper = affs_get_toupper (sb );
159
+ toupper_t fn = affs_get_toupper (sb );
160
160
u32 hash ;
161
161
162
162
hash = len = min (len , AFFSNAMEMAX );
163
163
for (; len > 0 ; len -- )
164
- hash = (hash * 13 + toupper (* name ++ )) & 0x7ff ;
164
+ hash = (hash * 13 + fn (* name ++ )) & 0x7ff ;
165
165
166
166
return hash % AFFS_SB (sb )-> s_hashsize ;
167
167
}
@@ -171,7 +171,7 @@ affs_find_entry(struct inode *dir, struct dentry *dentry)
171
171
{
172
172
struct super_block * sb = dir -> i_sb ;
173
173
struct buffer_head * bh ;
174
- toupper_t toupper = affs_get_toupper (sb );
174
+ toupper_t fn = affs_get_toupper (sb );
175
175
u32 key ;
176
176
177
177
pr_debug ("%s(\"%pd\")\n" , __func__ , dentry );
@@ -189,7 +189,7 @@ affs_find_entry(struct inode *dir, struct dentry *dentry)
189
189
bh = affs_bread (sb , key );
190
190
if (!bh )
191
191
return ERR_PTR (- EIO );
192
- if (affs_match (dentry , AFFS_TAIL (sb , bh )-> name , toupper ))
192
+ if (affs_match (dentry , AFFS_TAIL (sb , bh )-> name , fn ))
193
193
return bh ;
194
194
key = be32_to_cpu (AFFS_TAIL (sb , bh )-> hash_chain );
195
195
}
0 commit comments