diff options
author | Jan Kara <jack@suse.cz> | 2016-12-21 12:06:12 -0500 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2017-04-10 11:37:36 -0400 |
commit | 054c636e5c8054884ede889be82ce059879945e6 (patch) | |
tree | 0559d887ce9f1bd9ba0e594b0fc876d597327bc1 /kernel/audit_watch.c | |
parent | 7b1293234084ddb6469c4e9a5ef818f399b5786b (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_watch.c')
-rw-r--r-- | kernel/audit_watch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c index e32efed86828..13d30a8dfc56 100644 --- a/kernel/audit_watch.c +++ b/kernel/audit_watch.c | |||
@@ -157,8 +157,7 @@ static struct audit_parent *audit_init_parent(struct path *path) | |||
157 | 157 | ||
158 | INIT_LIST_HEAD(&parent->watches); | 158 | INIT_LIST_HEAD(&parent->watches); |
159 | 159 | ||
160 | fsnotify_init_mark(&parent->mark, audit_watch_group, | 160 | fsnotify_init_mark(&parent->mark, audit_watch_group); |
161 | audit_watch_free_mark); | ||
162 | parent->mark.mask = AUDIT_FS_WATCH; | 161 | parent->mark.mask = AUDIT_FS_WATCH; |
163 | ret = fsnotify_add_mark(&parent->mark, inode, NULL, 0); | 162 | ret = fsnotify_add_mark(&parent->mark, inode, NULL, 0); |
164 | if (ret < 0) { | 163 | if (ret < 0) { |
@@ -508,6 +507,7 @@ static int audit_watch_handle_event(struct fsnotify_group *group, | |||
508 | 507 | ||
509 | static const struct fsnotify_ops audit_watch_fsnotify_ops = { | 508 | static const struct fsnotify_ops audit_watch_fsnotify_ops = { |
510 | .handle_event = audit_watch_handle_event, | 509 | .handle_event = audit_watch_handle_event, |
510 | .free_mark = audit_watch_free_mark, | ||
511 | }; | 511 | }; |
512 | 512 | ||
513 | static int __init audit_watch_init(void) | 513 | static int __init audit_watch_init(void) |