Re: [RFC PATCH v7 03/24] fscrypt: export fscrypt_fname_encrypt and fscrypt_fname_encrypted_size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 25, 2021 at 09:58:13AM -0400, Jeff Layton wrote:
> +bool fscrypt_fname_encrypted_size(const struct inode *inode, u32 orig_len,
> +				  u32 max_len, u32 *encrypted_len_ret)
> +{
> +	return __fscrypt_fname_encrypted_size(&inode->i_crypt_info->ci_policy,
> +					      orig_len, max_len,
> +					      encrypted_len_ret);
> +}
> +EXPORT_SYMBOL(fscrypt_fname_encrypted_size);

This function could use a kerneldoc comment now that it will be exported.

> diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h
> index e300f6145ddc..b5c31baaa8bf 100644
> --- a/include/linux/fscrypt.h
> +++ b/include/linux/fscrypt.h
> @@ -212,6 +212,10 @@ int fscrypt_drop_inode(struct inode *inode);
>  /* fname.c */
>  int fscrypt_base64_encode(const u8 *src, int len, char *dst);
>  int fscrypt_base64_decode(const char *src, int len, u8 *dst);
> +bool fscrypt_fname_encrypted_size(const struct inode *inode, u32 orig_len,
> +				  u32 max_len, u32 *encrypted_len_ret);
> +int fscrypt_fname_encrypt(const struct inode *inode, const struct qstr *iname,
> +			  u8 *out, unsigned int olen);
>  int fscrypt_setup_filename(struct inode *inode, const struct qstr *iname,
>  			   int lookup, struct fscrypt_name *fname);

Generally I try to keep declarations in .h files in the same order as the
corresponding definitions in .c files.

- Eric



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux