Message ID | 202312152143029891646@zte.com.cn |
---|---|
State | New |
Headers | show |
Series | [linux-next] ext4: use kcalloc instead of open coded arithmetic | expand |
diff --git a/fs/ext4/hash.c b/fs/ext4/hash.c index deabe29da7fb..7a9afac1597c 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 = kcalloc(PATH_MAX, sizeof(char), GFP_KERNEL); if (!buff) return -ENOMEM;