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/gc.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/gc.c')
-rw-r--r-- | security/tomoyo/gc.c | 28 |
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) | |||
310 | struct tomoyo_acl_info *acl; | 310 | struct tomoyo_acl_info *acl; |
311 | list_for_each_entry_rcu(acl, &domain->acl_info_list, | 311 | list_for_each_entry_rcu(acl, &domain->acl_info_list, |
312 | list) { | 312 | list) { |
313 | switch (acl->type) { | 313 | if (!acl->is_deleted) |
314 | case TOMOYO_TYPE_PATH_ACL: | ||
315 | if (container_of(acl, | ||
316 | struct tomoyo_path_acl, | ||
317 | head)->perm) | ||
318 | continue; | ||
319 | break; | ||
320 | case TOMOYO_TYPE_PATH2_ACL: | ||
321 | if (container_of(acl, | ||
322 | struct tomoyo_path2_acl, | ||
323 | head)->perm) | ||
324 | continue; | ||
325 | break; | ||
326 | case TOMOYO_TYPE_PATH_NUMBER_ACL: | ||
327 | if (container_of(acl, | ||
328 | struct tomoyo_path_number_acl, | ||
329 | head)->perm) | ||
330 | continue; | ||
331 | break; | ||
332 | case TOMOYO_TYPE_PATH_NUMBER3_ACL: | ||
333 | if (container_of(acl, | ||
334 | struct tomoyo_path_number3_acl, | ||
335 | head)->perm) | ||
336 | continue; | ||
337 | break; | ||
338 | default: | ||
339 | continue; | 314 | continue; |
340 | } | ||
341 | if (tomoyo_add_to_gc(TOMOYO_ID_ACL, acl)) | 315 | if (tomoyo_add_to_gc(TOMOYO_ID_ACL, acl)) |
342 | list_del_rcu(&acl->list); | 316 | list_del_rcu(&acl->list); |
343 | else | 317 | else |