diff options
author | Eric Biggers <ebiggers@google.com> | 2021-09-09 20:45:13 +0200 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2021-09-21 04:32:33 +0200 |
commit | 4373b3dc922038e8924f648506f6556f2afa7e77 (patch) | |
tree | 315ddf83133cc6b0bacd418a349710fef86bf089 /fs/crypto/fname.c | |
parent | Linux 5.15-rc2 (diff) | |
download | linux-4373b3dc922038e8924f648506f6556f2afa7e77.tar.xz linux-4373b3dc922038e8924f648506f6556f2afa7e77.zip |
fscrypt: remove fscrypt_operations::max_namelen
The max_namelen field is unnecessary, as it is set to 255 (NAME_MAX) on
all filesystems that support fscrypt (or plan to support fscrypt). For
simplicity, just use NAME_MAX directly instead.
Link: https://lore.kernel.org/r/20210909184513.139281-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Diffstat (limited to 'fs/crypto/fname.c')
-rw-r--r-- | fs/crypto/fname.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/crypto/fname.c b/fs/crypto/fname.c index eb538c28df94..a9be4bc74a94 100644 --- a/fs/crypto/fname.c +++ b/fs/crypto/fname.c @@ -429,8 +429,7 @@ int fscrypt_setup_filename(struct inode *dir, const struct qstr *iname, if (fscrypt_has_encryption_key(dir)) { if (!fscrypt_fname_encrypted_size(&dir->i_crypt_info->ci_policy, - iname->len, - dir->i_sb->s_cop->max_namelen, + iname->len, NAME_MAX, &fname->crypto_buf.len)) return -ENAMETOOLONG; fname->crypto_buf.name = kmalloc(fname->crypto_buf.len, |