summaryrefslogtreecommitdiffstats
path: root/security/tomoyo/gc.c
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2010-06-12 13:46:22 +0200
committerJames Morris <jmorris@namei.org>2010-08-02 07:34:28 +0200
commit237ab459f12cb98eadd3fe7b85343e183a1076a4 (patch)
treef2835e2945016beb4e29b6a2ed8f9d372dc1b412 /security/tomoyo/gc.c
parentKEYS: Make /proc/keys check to see if a key is possessed before security check (diff)
downloadlinux-237ab459f12cb98eadd3fe7b85343e183a1076a4.tar.xz
linux-237ab459f12cb98eadd3fe7b85343e183a1076a4.zip
TOMOYO: Use callback for updating entries.
Use common "struct list_head" + "bool" + "u8" structure and use common code for elements using that structure. Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/tomoyo/gc.c')
-rw-r--r--security/tomoyo/gc.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/security/tomoyo/gc.c b/security/tomoyo/gc.c
index 8a31f0c628b2..aed7ddd0de84 100644
--- a/security/tomoyo/gc.c
+++ b/security/tomoyo/gc.c
@@ -310,34 +310,8 @@ static void tomoyo_collect_entry(void)
struct tomoyo_acl_info *acl;
list_for_each_entry_rcu(acl, &domain->acl_info_list,
list) {
- switch (acl->type) {
- case TOMOYO_TYPE_PATH_ACL:
- if (container_of(acl,
- struct tomoyo_path_acl,
- head)->perm)
- continue;
- break;
- case TOMOYO_TYPE_PATH2_ACL:
- if (container_of(acl,
- struct tomoyo_path2_acl,
- head)->perm)
- continue;
- break;
- case TOMOYO_TYPE_PATH_NUMBER_ACL:
- if (container_of(acl,
- struct tomoyo_path_number_acl,
- head)->perm)
- continue;
- break;
- case TOMOYO_TYPE_PATH_NUMBER3_ACL:
- if (container_of(acl,
- struct tomoyo_path_number3_acl,
- head)->perm)
- continue;
- break;
- default:
+ if (!acl->is_deleted)
continue;
- }
if (tomoyo_add_to_gc(TOMOYO_ID_ACL, acl))
list_del_rcu(&acl->list);
else