diff options
author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2010-06-12 07:46:22 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2010-08-02 01:34:28 -0400 |
commit | 237ab459f12cb98eadd3fe7b85343e183a1076a4 (patch) | |
tree | f2835e2945016beb4e29b6a2ed8f9d372dc1b412 /security/tomoyo/util.c | |
parent | 927942aabbbe506bf9bc70a16dc5460ecc64c148 (diff) |
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/util.c')
-rw-r--r-- | security/tomoyo/util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/security/tomoyo/util.c b/security/tomoyo/util.c index 307793ed6075..e5931686ca33 100644 --- a/security/tomoyo/util.c +++ b/security/tomoyo/util.c | |||
@@ -911,6 +911,8 @@ bool tomoyo_domain_quota_is_ok(struct tomoyo_request_info *r) | |||
911 | if (!domain) | 911 | if (!domain) |
912 | return true; | 912 | return true; |
913 | list_for_each_entry_rcu(ptr, &domain->acl_info_list, list) { | 913 | list_for_each_entry_rcu(ptr, &domain->acl_info_list, list) { |
914 | if (!ptr->is_deleted) | ||
915 | continue; | ||
914 | switch (ptr->type) { | 916 | switch (ptr->type) { |
915 | u16 perm; | 917 | u16 perm; |
916 | u8 i; | 918 | u8 i; |
@@ -944,10 +946,8 @@ bool tomoyo_domain_quota_is_ok(struct tomoyo_request_info *r) | |||
944 | if (perm & (1 << i)) | 946 | if (perm & (1 << i)) |
945 | count++; | 947 | count++; |
946 | break; | 948 | break; |
947 | case TOMOYO_TYPE_MOUNT_ACL: | 949 | default: |
948 | if (!container_of(ptr, struct tomoyo_mount_acl, head)-> | 950 | count++; |
949 | is_deleted) | ||
950 | count++; | ||
951 | } | 951 | } |
952 | } | 952 | } |
953 | if (count < tomoyo_profile(domain->profile)->learning-> | 953 | if (count < tomoyo_profile(domain->profile)->learning-> |