]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/blobdiff - kernel/audit_watch.c
cls_can: Syntax fix
[lisovros/linux_canprio.git] / kernel / audit_watch.c
index 9173bcf33763a8c803bec77b98154ee0d2f4aaa1..f0c9b2e7542dfd5b2980164a2f5ccedbcd2bb0d1 100644 (file)
@@ -164,8 +164,6 @@ static struct audit_parent *audit_init_parent(struct nameidata *ndp)
                return ERR_PTR(ret);
        }
 
-       fsnotify_recalc_group_mask(audit_watch_group);
-
        return parent;
 }
 
@@ -352,9 +350,6 @@ static void audit_remove_parent_watches(struct audit_parent *parent)
        mutex_unlock(&audit_filter_mutex);
 
        fsnotify_destroy_mark(&parent->mark);
-
-       fsnotify_recalc_group_mask(audit_watch_group);
-
 }
 
 /* Get path information necessary for adding watches. */
@@ -505,26 +500,20 @@ void audit_remove_watch_rule(struct audit_krule *krule)
                        audit_put_parent(parent);
                }
        }
-
-       fsnotify_recalc_group_mask(audit_watch_group);
-
 }
 
 static bool audit_watch_should_send_event(struct fsnotify_group *group, struct inode *inode,
-                                         struct vfsmount *mnt, struct fsnotify_mark *mark,
+                                         struct fsnotify_mark *inode_mark,
+                                         struct fsnotify_mark *vfsmount_mark,
                                          __u32 mask, void *data, int data_type)
 {
-       bool send;
-
-       mask = (mask & ~FS_EVENT_ON_CHILD);
-       send = (mark->mask & mask);
-
-       return send;
+       return true;
 }
 
 /* Update watch data in audit rules based on fsnotify events. */
 static int audit_watch_handle_event(struct fsnotify_group *group,
-                                   struct fsnotify_mark *mark,
+                                   struct fsnotify_mark *inode_mark,
+                                   struct fsnotify_mark *vfsmount_mark,
                                    struct fsnotify_event *event)
 {
        struct inode *inode;
@@ -532,13 +521,13 @@ static int audit_watch_handle_event(struct fsnotify_group *group,
        const char *dname = event->file_name;
        struct audit_parent *parent;
 
-       parent = container_of(mark, struct audit_parent, mark);
+       parent = container_of(inode_mark, struct audit_parent, mark);
 
        BUG_ON(group != audit_watch_group);
 
        switch (event->data_type) {
-       case (FSNOTIFY_EVENT_FILE):
-               inode = event->file->f_path.dentry->d_inode;
+       case (FSNOTIFY_EVENT_PATH):
+               inode = event->path.dentry->d_inode;
                break;
        case (FSNOTIFY_EVENT_INODE):
                inode = event->inode;