diff options
author | Eric Biggers <ebiggers@google.com> | 2018-01-12 07:30:08 +0300 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2018-01-12 07:30:08 +0300 |
commit | b9db0b4a68d373897119d1e0a3beebe1c1a23936 (patch) | |
tree | 3cb57195d294dae3eb19378428cabc75e78621e3 /include/linux/fscrypt_supp.h | |
parent | 2cbadadcfdf0d8a538ce32ed12e18ef487773b07 (diff) | |
download | linux-b9db0b4a68d373897119d1e0a3beebe1c1a23936.tar.xz |
fscrypt: fix up fscrypt_fname_encrypted_size() for internal use
Filesystems don't need fscrypt_fname_encrypted_size() anymore, so
unexport it and move it to fscrypt_private.h.
We also never calculate the encrypted size of a filename without having
the fscrypt_info present since it is needed to know the amount of
NUL-padding which is determined by the encryption policy, and also we
will always truncate the NUL-padding to the maximum filename length.
Therefore, also make fscrypt_fname_encrypted_size() assume that the
fscrypt_info is present, and make it truncate the returned length to the
specified max_len.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'include/linux/fscrypt_supp.h')
-rw-r--r-- | include/linux/fscrypt_supp.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/fscrypt_supp.h b/include/linux/fscrypt_supp.h index e00191deb0d6..2dd5767c77b0 100644 --- a/include/linux/fscrypt_supp.h +++ b/include/linux/fscrypt_supp.h @@ -107,7 +107,6 @@ static inline void fscrypt_free_filename(struct fscrypt_name *fname) kfree(fname->crypto_buf.name); } -extern u32 fscrypt_fname_encrypted_size(const struct inode *, u32); extern int fscrypt_fname_alloc_buffer(const struct inode *, u32, struct fscrypt_str *); extern void fscrypt_fname_free_buffer(struct fscrypt_str *); |