summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthan Carter Edwards <ethan@ethancedwards.com>2025-03-16 08:33:59 +0300
committerTheodore Ts'o <tytso@mit.edu>2025-03-21 08:10:10 +0300
commit1e93d6f221e7cfe5e069583a2b664e79eb361ba6 (patch)
tree84f2749dbc941a1fc8b12c5d9af6d91a806d91af
parentaac45075f6d79a63ac8dff93b3e1d7053a6ba628 (diff)
downloadlinux-1e93d6f221e7cfe5e069583a2b664e79eb361ba6.tar.xz
ext4: hash: simplify kzalloc(n * 1, ...) to kzalloc(n, ...)
sizeof(char) evaluates to 1. Remove the churn. Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com> Reviewed-by: Andreas Dilger <adilger@dilger.ca> Link: https://patch.msgid.link/20250316-ext4-hash-kcalloc-v2-1-2a99e93ec6e0@ethancedwards.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--fs/ext4/hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/hash.c b/fs/ext4/hash.c
index deabe29da7fb..33cd5b6b02d5 100644
--- a/fs/ext4/hash.c
+++ b/fs/ext4/hash.c
@@ -302,7 +302,7 @@ int ext4fs_dirhash(const struct inode *dir, const char *name, int len,
if (len && IS_CASEFOLDED(dir) &&
(!IS_ENCRYPTED(dir) || fscrypt_has_encryption_key(dir))) {
- buff = kzalloc(sizeof(char) * PATH_MAX, GFP_KERNEL);
+ buff = kzalloc(PATH_MAX, GFP_KERNEL);
if (!buff)
return -ENOMEM;