From f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Wed, 31 Jan 2024 01:04:47 +0000
Subject: [PATCH] add driver 5G
---
kernel/fs/ext4/hash.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/kernel/fs/ext4/hash.c b/kernel/fs/ext4/hash.c
index 326b4d2..aeec7a2 100644
--- a/kernel/fs/ext4/hash.c
+++ b/kernel/fs/ext4/hash.c
@@ -233,6 +233,7 @@
break;
case DX_HASH_HALF_MD4_UNSIGNED:
str2hashbuf = str2hashbuf_unsigned;
+ fallthrough;
case DX_HASH_HALF_MD4:
p = name;
while (len > 0) {
@@ -246,6 +247,7 @@
break;
case DX_HASH_TEA_UNSIGNED:
str2hashbuf = str2hashbuf_unsigned;
+ fallthrough;
case DX_HASH_TEA:
p = name;
while (len > 0) {
@@ -294,7 +296,8 @@
unsigned char *buff;
struct qstr qstr = {.name = name, .len = len };
- if (len && needs_casefold(dir) && um) {
+ if (len && IS_CASEFOLDED(dir) && um &&
+ (!IS_ENCRYPTED(dir) || fscrypt_has_encryption_key(dir))) {
buff = kzalloc(sizeof(char) * PATH_MAX, GFP_KERNEL);
if (!buff)
return -ENOMEM;
--
Gitblit v1.6.2