diff mbox

fscrypt: remove fscrypt_symlink_data_len()

Message ID 20170404214334.113915-1-ebiggers3@gmail.com (mailing list archive)
State Accepted
Headers show

Commit Message

Eric Biggers April 4, 2017, 9:43 p.m. UTC
From: Eric Biggers <ebiggers@google.com>

fscrypt_symlink_data_len() is never called and can be removed.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 include/linux/fscrypt_common.h | 11 -----------
 1 file changed, 11 deletions(-)

Comments

Richard Weinberger April 6, 2017, 7:22 p.m. UTC | #1
On Tue, Apr 4, 2017 at 11:43 PM, Eric Biggers <ebiggers3@gmail.com> wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> fscrypt_symlink_data_len() is never called and can be removed.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
>  include/linux/fscrypt_common.h | 11 -----------
>  1 file changed, 11 deletions(-)
>
> diff --git a/include/linux/fscrypt_common.h b/include/linux/fscrypt_common.h
> index 10c1abfbac6c..0a30c106c1e5 100644
> --- a/include/linux/fscrypt_common.h
> +++ b/include/linux/fscrypt_common.h
> @@ -46,17 +46,6 @@ struct fscrypt_symlink_data {
>         char encrypted_path[1];
>  } __packed;
>
> -/**
> - * This function is used to calculate the disk space required to
> - * store a filename of length l in encrypted symlink format.
> - */
> -static inline u32 fscrypt_symlink_data_len(u32 l)
> -{
> -       if (l < FS_CRYPTO_BLOCK_SIZE)
> -               l = FS_CRYPTO_BLOCK_SIZE;
> -       return (l + sizeof(struct fscrypt_symlink_data) - 1);
> -}
> -

Reviewed-by: Richard Weinberger <richard@nod.at>
Theodore Ts'o April 30, 2017, 6:16 a.m. UTC | #2
On Tue, Apr 04, 2017 at 02:43:34PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> fscrypt_symlink_data_len() is never called and can be removed.
> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> Reviewed-by: Richard Weinberger <richard@nod.at>

Thanks, applied.

				- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-fscrypt" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/linux/fscrypt_common.h b/include/linux/fscrypt_common.h
index 10c1abfbac6c..0a30c106c1e5 100644
--- a/include/linux/fscrypt_common.h
+++ b/include/linux/fscrypt_common.h
@@ -46,17 +46,6 @@  struct fscrypt_symlink_data {
 	char encrypted_path[1];
 } __packed;
 
-/**
- * This function is used to calculate the disk space required to
- * store a filename of length l in encrypted symlink format.
- */
-static inline u32 fscrypt_symlink_data_len(u32 l)
-{
-	if (l < FS_CRYPTO_BLOCK_SIZE)
-		l = FS_CRYPTO_BLOCK_SIZE;
-	return (l + sizeof(struct fscrypt_symlink_data) - 1);
-}
-
 struct fscrypt_str {
 	unsigned char *name;
 	u32 len;