.. | .. |
---|
233 | 233 | break; |
---|
234 | 234 | case DX_HASH_HALF_MD4_UNSIGNED: |
---|
235 | 235 | str2hashbuf = str2hashbuf_unsigned; |
---|
| 236 | + fallthrough; |
---|
236 | 237 | case DX_HASH_HALF_MD4: |
---|
237 | 238 | p = name; |
---|
238 | 239 | while (len > 0) { |
---|
.. | .. |
---|
246 | 247 | break; |
---|
247 | 248 | case DX_HASH_TEA_UNSIGNED: |
---|
248 | 249 | str2hashbuf = str2hashbuf_unsigned; |
---|
| 250 | + fallthrough; |
---|
249 | 251 | case DX_HASH_TEA: |
---|
250 | 252 | p = name; |
---|
251 | 253 | while (len > 0) { |
---|
.. | .. |
---|
294 | 296 | unsigned char *buff; |
---|
295 | 297 | struct qstr qstr = {.name = name, .len = len }; |
---|
296 | 298 | |
---|
297 | | - if (len && needs_casefold(dir) && um) { |
---|
| 299 | + if (len && IS_CASEFOLDED(dir) && um && |
---|
| 300 | + (!IS_ENCRYPTED(dir) || fscrypt_has_encryption_key(dir))) { |
---|
298 | 301 | buff = kzalloc(sizeof(char) * PATH_MAX, GFP_KERNEL); |
---|
299 | 302 | if (!buff) |
---|
300 | 303 | return -ENOMEM; |
---|