diff options
author | Eric Biggers <ebiggers@google.com> | 2023-08-14 11:29:02 -0700 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2023-08-27 11:27:13 -0400 |
commit | b81427939590450172716093dafdda8ef52e020f (patch) | |
tree | 9bb032b4126127cf65cf213753da41d1e6a99ebb /fs/ext4/hash.c | |
parent | 8216776ccff6fcd40e3fdaa109aa4150ebe760b3 (diff) |
ext4: remove redundant checks of s_encoding
Now that ext4 does not allow inodes with the casefold flag to be
instantiated when unsupported, it's unnecessary to repeatedly check for
support later on during random filesystem operations.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20230814182903.37267-3-ebiggers@kernel.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/hash.c')
-rw-r--r-- | fs/ext4/hash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/hash.c b/fs/ext4/hash.c index 46c3423ddfa1..deabe29da7fb 100644 --- a/fs/ext4/hash.c +++ b/fs/ext4/hash.c @@ -300,7 +300,7 @@ int ext4fs_dirhash(const struct inode *dir, const char *name, int len, unsigned char *buff; struct qstr qstr = {.name = name, .len = len }; - if (len && IS_CASEFOLDED(dir) && um && + if (len && IS_CASEFOLDED(dir) && (!IS_ENCRYPTED(dir) || fscrypt_has_encryption_key(dir))) { buff = kzalloc(sizeof(char) * PATH_MAX, GFP_KERNEL); if (!buff) |