Commit cf35ca69131d5fc8febb74629d173e0731bf49c0

Authored by Roberto Sassu
Committed by Tyler Hicks
1 parent 1821df040a

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>

Showing 3 changed files with 0 additions and 3 deletions Side-by-side Diff

fs/ecryptfs/crypto.c
... ... @@ -266,7 +266,6 @@
266 266 &mount_crypt_stat->global_auth_tok_list,
267 267 mount_crypt_stat_list) {
268 268 list_del(&auth_tok->mount_crypt_stat_list);
269   - mount_crypt_stat->num_global_auth_toks--;
270 269 if (auth_tok->global_auth_tok_key
271 270 && !(auth_tok->flags & ECRYPTFS_AUTH_TOK_INVALID))
272 271 key_put(auth_tok->global_auth_tok_key);
fs/ecryptfs/ecryptfs_kernel.h
... ... @@ -378,7 +378,6 @@
378 378 u32 flags;
379 379 struct list_head global_auth_tok_list;
380 380 struct mutex global_auth_tok_list_mutex;
381   - size_t num_global_auth_toks;
382 381 size_t global_default_cipher_key_size;
383 382 size_t global_default_fn_cipher_key_bytes;
384 383 unsigned char global_default_cipher_name[ECRYPTFS_MAX_CIPHER_NAME_SIZE
fs/ecryptfs/keystore.c
... ... @@ -2454,7 +2454,6 @@
2454 2454 mutex_lock(&mount_crypt_stat->global_auth_tok_list_mutex);
2455 2455 list_add(&new_auth_tok->mount_crypt_stat_list,
2456 2456 &mount_crypt_stat->global_auth_tok_list);
2457   - mount_crypt_stat->num_global_auth_toks++;
2458 2457 mutex_unlock(&mount_crypt_stat->global_auth_tok_list_mutex);
2459 2458 out:
2460 2459 return rc;