Skip to contentSkip to conversation

fscrypt: remove fscrypt_symlink_data_len()

PATCH Applied Eric Biggers 3 participants 3 messages Apr 4, 2017 – Apr 30, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fscrypt: remove fscrypt_symlink_data_len()

From: Eric Biggers <[email protected]>

fscrypt_symlink_data_len() is never called and can be removed.

---
 include/linux/fscrypt_common.h | 11 -----------
 1 file changed, 11 deletions(-)
include/linux/fscrypt_common.h +0 -11
index 10c1abfbac6c..0a30c106c1e5 100644
@@ -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;
Signature · 1 line
2.12.2.715.g7642488e1d-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 18 lines · Eric Biggers

From: Eric Biggers <[email protected]>

fscrypt_symlink_data_len() is never called and can be removed.

---
 include/linux/fscrypt_common.h | 11 -----------
 1 file changed, 11 deletions(-)
include/linux/fscrypt_common.h +0 -1
index 10c1abfbac6c..0a30c106c1e5 100644
@@ -46,17 +46,6 @@ struct fscrypt_symlink_data {
        char encrypted_path[1];
 } __packed;
 
-/**

include/linux/fscrypt_common.h struct fscrypt_symlink_data { · line 59

Quoted 10 lines
include/linux/fscrypt_common.h +0 -10
- * 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);
-}
-
Signature · 2 lines
Thanks,
//richard