]> git.karo-electronics.de Git - linux-beck.git/commitdiff
eCryptfs: removed num_global_auth_toks from ecryptfs_mount_crypt_stat
authorRoberto Sassu <roberto.sassu@polito.it>
Mon, 21 Mar 2011 15:00:51 +0000 (16:00 +0100)
committerTyler Hicks <tyhicks@linux.vnet.ibm.com>
Mon, 28 Mar 2011 06:49:39 +0000 (01:49 -0500)
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>
fs/ecryptfs/crypto.c
fs/ecryptfs/ecryptfs_kernel.h
fs/ecryptfs/keystore.c

index 98a2a314ea684121c3b96ff314c77f9b943e8c3e..d2a70a4561f91257fe44d7cb867e9d14ec1ff908 100644 (file)
@@ -266,7 +266,6 @@ void ecryptfs_destroy_mount_crypt_stat(
                                 &mount_crypt_stat->global_auth_tok_list,
                                 mount_crypt_stat_list) {
                list_del(&auth_tok->mount_crypt_stat_list);
-               mount_crypt_stat->num_global_auth_toks--;
                if (auth_tok->global_auth_tok_key
                    && !(auth_tok->flags & ECRYPTFS_AUTH_TOK_INVALID))
                        key_put(auth_tok->global_auth_tok_key);
index 3ef5b0030231635fa5037929baf980608a9ba6fe..6c6b8261092ef557f62c0e4c09aa30615c6da005 100644 (file)
@@ -378,7 +378,6 @@ struct ecryptfs_mount_crypt_stat {
        u32 flags;
        struct list_head global_auth_tok_list;
        struct mutex global_auth_tok_list_mutex;
-       size_t num_global_auth_toks;
        size_t global_default_cipher_key_size;
        size_t global_default_fn_cipher_key_bytes;
        unsigned char global_default_cipher_name[ECRYPTFS_MAX_CIPHER_NAME_SIZE
index 4feb78c23651ae310e41381782cce0cf60ccc0c2..523e51dec66eb0a4ea1462cada59feb480d54e30 100644 (file)
@@ -2454,7 +2454,6 @@ ecryptfs_add_global_auth_tok(struct ecryptfs_mount_crypt_stat *mount_crypt_stat,
        mutex_lock(&mount_crypt_stat->global_auth_tok_list_mutex);
        list_add(&new_auth_tok->mount_crypt_stat_list,
                 &mount_crypt_stat->global_auth_tok_list);
-       mount_crypt_stat->num_global_auth_toks++;
        mutex_unlock(&mount_crypt_stat->global_auth_tok_list_mutex);
 out:
        return rc;