summaryrefslogtreecommitdiffstats
path: root/security/tomoyo/gc.c
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2010-06-15 09:22:42 +0900
committerJames Morris <jmorris@namei.org>2010-08-02 15:34:28 +1000
commit82e0f001a4c1112dcff9cafa9812a33889ad9b8a (patch)
tree55c7e99f8773129b602f837f0c79f8d542021195 /security/tomoyo/gc.c
parent237ab459f12cb98eadd3fe7b85343e183a1076a4 (diff)
downloadlinux-82e0f001a4c1112dcff9cafa9812a33889ad9b8a.tar.gz
linux-82e0f001a4c1112dcff9cafa9812a33889ad9b8a.tar.bz2
linux-82e0f001a4c1112dcff9cafa9812a33889ad9b8a.zip
TOMOYO: Use common structure for list element.
Use common "struct list_head" + "bool" 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.c63
1 files changed, 33 insertions, 30 deletions
diff --git a/security/tomoyo/gc.c b/security/tomoyo/gc.c
index aed7ddd0de84..2dd9665af260 100644
--- a/security/tomoyo/gc.c
+++ b/security/tomoyo/gc.c
@@ -216,33 +216,34 @@ static void tomoyo_collect_entry(void)
{
struct tomoyo_globally_readable_file_entry *ptr;
list_for_each_entry_rcu(ptr, &tomoyo_globally_readable_list,
- list) {
- if (!ptr->is_deleted)
+ head.list) {
+ if (!ptr->head.is_deleted)
continue;
if (tomoyo_add_to_gc(TOMOYO_ID_GLOBALLY_READABLE, ptr))
- list_del_rcu(&ptr->list);
+ list_del_rcu(&ptr->head.list);
else
break;
}
}
{
struct tomoyo_pattern_entry *ptr;
- list_for_each_entry_rcu(ptr, &tomoyo_pattern_list, list) {
- if (!ptr->is_deleted)
+ list_for_each_entry_rcu(ptr, &tomoyo_pattern_list, head.list) {
+ if (!ptr->head.is_deleted)
continue;
if (tomoyo_add_to_gc(TOMOYO_ID_PATTERN, ptr))
- list_del_rcu(&ptr->list);
+ list_del_rcu(&ptr->head.list);
else
break;
}
}
{
struct tomoyo_no_rewrite_entry *ptr;
- list_for_each_entry_rcu(ptr, &tomoyo_no_rewrite_list, list) {
- if (!ptr->is_deleted)
+ list_for_each_entry_rcu(ptr, &tomoyo_no_rewrite_list,
+ head.list) {
+ if (!ptr->head.is_deleted)
continue;
if (tomoyo_add_to_gc(TOMOYO_ID_NO_REWRITE, ptr))
- list_del_rcu(&ptr->list);
+ list_del_rcu(&ptr->head.list);
else
break;
}
@@ -250,44 +251,46 @@ static void tomoyo_collect_entry(void)
{
struct tomoyo_domain_initializer_entry *ptr;
list_for_each_entry_rcu(ptr, &tomoyo_domain_initializer_list,
- list) {
- if (!ptr->is_deleted)
+ head.list) {
+ if (!ptr->head.is_deleted)
continue;
if (tomoyo_add_to_gc(TOMOYO_ID_DOMAIN_INITIALIZER, ptr))
- list_del_rcu(&ptr->list);
+ list_del_rcu(&ptr->head.list);
else
break;
}
}
{
struct tomoyo_domain_keeper_entry *ptr;
- list_for_each_entry_rcu(ptr, &tomoyo_domain_keeper_list, list) {
- if (!ptr->is_deleted)
+ list_for_each_entry_rcu(ptr, &tomoyo_domain_keeper_list,
+ head.list) {
+ if (!ptr->head.is_deleted)
continue;
if (tomoyo_add_to_gc(TOMOYO_ID_DOMAIN_KEEPER, ptr))
- list_del_rcu(&ptr->list);
+ list_del_rcu(&ptr->head.list);
else
break;
}
}
{
struct tomoyo_aggregator_entry *ptr;
- list_for_each_entry_rcu(ptr, &tomoyo_aggregator_list, list) {
- if (!ptr->is_deleted)
+ list_for_each_entry_rcu(ptr, &tomoyo_aggregator_list,
+ head.list) {
+ if (!ptr->head.is_deleted)
continue;
if (tomoyo_add_to_gc(TOMOYO_ID_AGGREGATOR, ptr))
- list_del_rcu(&ptr->list);
+ list_del_rcu(&ptr->head.list);
else
break;
}
}
{
struct tomoyo_alias_entry *ptr;
- list_for_each_entry_rcu(ptr, &tomoyo_alias_list, list) {
- if (!ptr->is_deleted)
+ list_for_each_entry_rcu(ptr, &tomoyo_alias_list, head.list) {
+ if (!ptr->head.is_deleted)
continue;
if (tomoyo_add_to_gc(TOMOYO_ID_ALIAS, ptr))
- list_del_rcu(&ptr->list);
+ list_del_rcu(&ptr->head.list);
else
break;
}
@@ -295,11 +298,11 @@ static void tomoyo_collect_entry(void)
{
struct tomoyo_policy_manager_entry *ptr;
list_for_each_entry_rcu(ptr, &tomoyo_policy_manager_list,
- list) {
- if (!ptr->is_deleted)
+ head.list) {
+ if (!ptr->head.is_deleted)
continue;
if (tomoyo_add_to_gc(TOMOYO_ID_MANAGER, ptr))
- list_del_rcu(&ptr->list);
+ list_del_rcu(&ptr->head.list);
else
break;
}
@@ -352,12 +355,12 @@ static void tomoyo_collect_entry(void)
list_for_each_entry_rcu(group, &tomoyo_path_group_list, list) {
struct tomoyo_path_group_member *member;
list_for_each_entry_rcu(member, &group->member_list,
- list) {
- if (!member->is_deleted)
+ head.list) {
+ if (!member->head.is_deleted)
continue;
if (tomoyo_add_to_gc(TOMOYO_ID_PATH_GROUP_MEMBER,
member))
- list_del_rcu(&member->list);
+ list_del_rcu(&member->head.list);
else
break;
}
@@ -375,12 +378,12 @@ static void tomoyo_collect_entry(void)
list_for_each_entry_rcu(group, &tomoyo_number_group_list, list) {
struct tomoyo_number_group_member *member;
list_for_each_entry_rcu(member, &group->member_list,
- list) {
- if (!member->is_deleted)
+ head.list) {
+ if (!member->head.is_deleted)
continue;
if (tomoyo_add_to_gc(TOMOYO_ID_NUMBER_GROUP_MEMBER,
member))
- list_del_rcu(&member->list);
+ list_del_rcu(&member->head.list);
else
break;
}