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/common.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/common.c')
-rw-r--r-- | security/tomoyo/common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c index 811adb5e9fea..6556e5d27d74 100644 --- a/security/tomoyo/common.c +++ b/security/tomoyo/common.c | |||
@@ -950,8 +950,6 @@ static bool tomoyo_print_mount_acl(struct tomoyo_io_buffer *head, | |||
950 | struct tomoyo_mount_acl *ptr) | 950 | struct tomoyo_mount_acl *ptr) |
951 | { | 951 | { |
952 | const int pos = head->read_avail; | 952 | const int pos = head->read_avail; |
953 | if (ptr->is_deleted) | ||
954 | return true; | ||
955 | if (!tomoyo_io_printf(head, TOMOYO_KEYWORD_ALLOW_MOUNT) || | 953 | if (!tomoyo_io_printf(head, TOMOYO_KEYWORD_ALLOW_MOUNT) || |
956 | !tomoyo_print_name_union(head, &ptr->dev_name) || | 954 | !tomoyo_print_name_union(head, &ptr->dev_name) || |
957 | !tomoyo_print_name_union(head, &ptr->dir_name) || | 955 | !tomoyo_print_name_union(head, &ptr->dir_name) || |
@@ -977,6 +975,8 @@ static bool tomoyo_print_entry(struct tomoyo_io_buffer *head, | |||
977 | { | 975 | { |
978 | const u8 acl_type = ptr->type; | 976 | const u8 acl_type = ptr->type; |
979 | 977 | ||
978 | if (ptr->is_deleted) | ||
979 | return true; | ||
980 | if (acl_type == TOMOYO_TYPE_PATH_ACL) { | 980 | if (acl_type == TOMOYO_TYPE_PATH_ACL) { |
981 | struct tomoyo_path_acl *acl | 981 | struct tomoyo_path_acl *acl |
982 | = container_of(ptr, struct tomoyo_path_acl, head); | 982 | = container_of(ptr, struct tomoyo_path_acl, head); |