]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - kernel/audit_fsnotify.c
fsnotify: Move ->free_mark callback to fsnotify_ops
[mirror_ubuntu-bionic-kernel.git] / kernel / audit_fsnotify.c
index 7ea57e516029d6b82a9e72adfea70d45f538cb2b..4aad0a467fedceb9ff26eaa10d2fabed2244b69d 100644 (file)
@@ -103,15 +103,15 @@ struct audit_fsnotify_mark *audit_alloc_mark(struct audit_krule *krule, char *pa
                goto out;
        }
 
-       fsnotify_init_mark(&audit_mark->mark, 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);
        audit_mark->rule = krule;
 
-       ret = fsnotify_add_mark(&audit_mark->mark, audit_fsnotify_group, inode, NULL, true);
+       ret = fsnotify_add_mark(&audit_mark->mark, inode, NULL, true);
        if (ret < 0) {
-               audit_fsnotify_mark_free(audit_mark);
+               fsnotify_put_mark(&audit_mark->mark);
                audit_mark = ERR_PTR(ret);
        }
 out:
@@ -168,7 +168,8 @@ static int audit_mark_handle_event(struct fsnotify_group *group,
                                    struct fsnotify_mark *inode_mark,
                                    struct fsnotify_mark *vfsmount_mark,
                                    u32 mask, const void *data, int data_type,
-                                   const unsigned char *dname, u32 cookie)
+                                   const unsigned char *dname, u32 cookie,
+                                   struct fsnotify_iter_info *iter_info)
 {
        struct audit_fsnotify_mark *audit_mark;
        const struct inode *inode = NULL;
@@ -201,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)