Skip to content

Commit cf35ca6

Browse files
Roberto SassuTyler Hicks
authored andcommitted
eCryptfs: removed num_global_auth_toks from ecryptfs_mount_crypt_stat
This patch removes the 'num_global_auth_toks' field of the ecryptfs_mount_crypt_stat structure, used to count the number of items in the 'global_auth_tok_list' list. This variable is not needed because there are no checks based upon it. Signed-off-by: Roberto Sassu <roberto.sassu@polito.it> Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
1 parent 1821df0 commit cf35ca6

3 files changed

Lines changed: 0 additions & 3 deletions

File tree

‎fs/ecryptfs/crypto.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@ void ecryptfs_destroy_mount_crypt_stat(
266266
&mount_crypt_stat->global_auth_tok_list,
267267
mount_crypt_stat_list) {
268268
list_del(&auth_tok->mount_crypt_stat_list);
269-
mount_crypt_stat->num_global_auth_toks--;
270269
if (auth_tok->global_auth_tok_key
271270
&& !(auth_tok->flags & ECRYPTFS_AUTH_TOK_INVALID))
272271
key_put(auth_tok->global_auth_tok_key);

‎fs/ecryptfs/ecryptfs_kernel.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,6 @@ struct ecryptfs_mount_crypt_stat {
378378
u32 flags;
379379
struct list_head global_auth_tok_list;
380380
struct mutex global_auth_tok_list_mutex;
381-
size_t num_global_auth_toks;
382381
size_t global_default_cipher_key_size;
383382
size_t global_default_fn_cipher_key_bytes;
384383
unsigned char global_default_cipher_name[ECRYPTFS_MAX_CIPHER_NAME_SIZE

‎fs/ecryptfs/keystore.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2454,7 +2454,6 @@ ecryptfs_add_global_auth_tok(struct ecryptfs_mount_crypt_stat *mount_crypt_stat,
24542454
mutex_lock(&mount_crypt_stat->global_auth_tok_list_mutex);
24552455
list_add(&new_auth_tok->mount_crypt_stat_list,
24562456
&mount_crypt_stat->global_auth_tok_list);
2457-
mount_crypt_stat->num_global_auth_toks++;
24582457
mutex_unlock(&mount_crypt_stat->global_auth_tok_list_mutex);
24592458
out:
24602459
return rc;

0 commit comments

Comments
 (0)