summaryrefslogtreecommitdiff
path: root/kernel/audit_fsnotify.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2016-12-21 18:06:12 +0100
committerJan Kara <jack@suse.cz>2017-04-10 17:37:36 +0200
commit054c636e5c8054884ede889be82ce059879945e6 (patch)
tree0559d887ce9f1bd9ba0e594b0fc876d597327bc1 /kernel/audit_fsnotify.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_fsnotify.c')
-rw-r--r--kernel/audit_fsnotify.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/audit_fsnotify.c b/kernel/audit_fsnotify.c
index 2522ceaca758..4aad0a467fed 100644
--- a/kernel/audit_fsnotify.c
+++ b/kernel/audit_fsnotify.c
@@ -103,8 +103,7 @@ struct audit_fsnotify_mark *audit_alloc_mark(struct audit_krule *krule, char *pa
goto out;
}
- fsnotify_init_mark(&audit_mark->mark, audit_fsnotify_group,
- audit_fsnotify_free_mark);
+ fsnotify_init_mark(&audit_mark->mark, audit_fsnotify_group);
audit_mark->mark.mask = AUDIT_FS_EVENTS;
audit_mark->path = pathname;
audit_update_mark(audit_mark, dentry->d_inode);
@@ -203,6 +202,7 @@ static int audit_mark_handle_event(struct fsnotify_group *group,
static const struct fsnotify_ops audit_mark_fsnotify_ops = {
.handle_event = audit_mark_handle_event,
+ .free_mark = audit_fsnotify_free_mark,
};
static int __init audit_fsnotify_init(void)