summaryrefslogtreecommitdiffstats
path: root/kernel/audit_tree.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2016-12-21 12:06:12 -0500
committerJan Kara <jack@suse.cz>2017-04-10 11:37:36 -0400
commit054c636e5c8054884ede889be82ce059879945e6 (patch)
tree0559d887ce9f1bd9ba0e594b0fc876d597327bc1 /kernel/audit_tree.c
parent7b1293234084ddb6469c4e9a5ef818f399b5786b (diff)
fsnotify: Move ->free_mark callback to fsnotify_ops
Pointer to ->free_mark callback unnecessarily occupies one long in each fsnotify_mark although they are the same for all marks from one notification group. Move the callback pointer to fsnotify_ops. Reviewed-by: Miklos Szeredi <mszeredi@redhat.com> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'kernel/audit_tree.c')
-rw-r--r--kernel/audit_tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c
index da7f7a3e6a42..a14cff67a148 100644
--- a/kernel/audit_tree.c
+++ b/kernel/audit_tree.c
@@ -154,8 +154,7 @@ static struct audit_chunk *alloc_chunk(int count)
154 INIT_LIST_HEAD(&chunk->owners[i].list); 154 INIT_LIST_HEAD(&chunk->owners[i].list);
155 chunk->owners[i].index = i; 155 chunk->owners[i].index = i;
156 } 156 }
157 fsnotify_init_mark(&chunk->mark, audit_tree_group, 157 fsnotify_init_mark(&chunk->mark, audit_tree_group);
158 audit_tree_destroy_watch);
159 chunk->mark.mask = FS_IN_IGNORED; 158 chunk->mark.mask = FS_IN_IGNORED;
160 return chunk; 159 return chunk;
161} 160}
@@ -1013,6 +1012,7 @@ static void audit_tree_freeing_mark(struct fsnotify_mark *entry, struct fsnotify
1013static const struct fsnotify_ops audit_tree_ops = { 1012static const struct fsnotify_ops audit_tree_ops = {
1014 .handle_event = audit_tree_handle_event, 1013 .handle_event = audit_tree_handle_event,
1015 .freeing_mark = audit_tree_freeing_mark, 1014 .freeing_mark = audit_tree_freeing_mark,
1015 .free_mark = audit_tree_destroy_watch,
1016}; 1016};
1017 1017
1018static int __init audit_tree_init(void) 1018static int __init audit_tree_init(void)