]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/fsnotify_backend.h
block: add secure discard
[karo-tx-linux.git] / include / linux / fsnotify_backend.h
index 225dc0c3a48cccb5b2e4cafb2c3887f57a8deac6..9bbfd7204b04aff0fe6a06b34734df452b12b773 100644 (file)
@@ -92,9 +92,12 @@ struct fsnotify_event_private_data;
  */
 struct fsnotify_ops {
        bool (*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);
-       int (*handle_event)(struct fsnotify_group *group, struct fsnotify_mark *mark,
+       int (*handle_event)(struct fsnotify_group *group,
+                           struct fsnotify_mark *inode_mark,
+                           struct fsnotify_mark *vfsmount_mark,
                            struct fsnotify_event *event);
        void (*free_group_priv)(struct fsnotify_group *group);
        void (*freeing_mark)(struct fsnotify_mark *mark, struct fsnotify_group *group);
@@ -108,26 +111,6 @@ struct fsnotify_ops {
  * everything will be cleaned up.
  */
 struct fsnotify_group {
-       /*
-        * global list of all groups receiving events from fsnotify.
-        * anchored by fsnotify_inode_groups and protected by either fsnotify_grp_mutex
-        * or fsnotify_grp_srcu depending on write vs read.
-        */
-       struct list_head inode_group_list;
-       /*
-        * same as above except anchored by fsnotify_vfsmount_groups
-        */
-       struct list_head vfsmount_group_list;
-
-       /*
-        * Defines all of the event types in which this group is interested.
-        * This mask is a bitwise OR of the FS_* events from above.  Each time
-        * this mask changes for a group (if it changes) the correct functions
-        * must be called to update the global structures which indicate global
-        * interest in event types.
-        */
-       __u32 mask;
-
        /*
         * How the refcnt is used is up to each group.  When the refcnt hits 0
         * fsnotify will clean up all of the resources associated with this group.
@@ -154,10 +137,6 @@ struct fsnotify_group {
                                         * a group */
        struct list_head marks_list;    /* all inode marks for this group */
 
-       /* prevents double list_del of group_list.  protected by global fsnotify_grp_mutex */
-       bool on_inode_group_list;
-       bool on_vfsmount_group_list;
-
        /* groups can define private fields here or use the void *private */
        union {
                void *private;
@@ -365,12 +344,8 @@ static inline void __fsnotify_d_instantiate(struct dentry *dentry, struct inode
 
 /* called from fsnotify listeners, such as fanotify or dnotify */
 
-/* must call when a group changes its ->mask */
-extern void fsnotify_recalc_global_mask(void);
 /* get a reference to an existing or create a new group */
 extern struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops);
-/* run all marks associated with this group and update group->mask */
-extern void fsnotify_recalc_group_mask(struct fsnotify_group *group);
 /* drop reference on a group from fsnotify_alloc_group */
 extern void fsnotify_put_group(struct fsnotify_group *group);