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>
This commit is contained in:
Ethan Carter Edwards 2025-03-16 01:33:59 -04:00 committed by Theodore Ts'o
parent aac45075f6
commit 1e93d6f221

View File

@ -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;