* events.
*/
static int dnotify_handle_event(struct fsnotify_group *group,
+ struct fsnotify_mark *mark,
struct fsnotify_event *event)
{
struct fsnotify_mark *fsn_mark = NULL;
*/
static bool dnotify_should_send_event(struct fsnotify_group *group,
struct inode *inode, struct vfsmount *mnt,
- __u32 mask, void *data, int data_type)
+ struct fsnotify_mark *mark, __u32 mask,
+ void *data, int data_type)
{
struct fsnotify_mark *fsn_mark;
bool send;
}
#endif
-static int fanotify_handle_event(struct fsnotify_group *group, struct fsnotify_event *event)
+static int fanotify_handle_event(struct fsnotify_group *group,
+ struct fsnotify_mark *mark,
+ struct fsnotify_event *event)
{
int ret = 0;
struct fsnotify_event *notify_event = NULL;
}
static bool fanotify_should_send_event(struct fsnotify_group *group, struct inode *to_tell,
- struct vfsmount *mnt, __u32 mask, void *data,
- int data_type)
+ struct vfsmount *mnt, struct fsnotify_mark *mark,
+ __u32 mask, void *data, int data_type)
{
pr_debug("%s: group=%p to_tell=%p mnt=%p mask=%x data=%p data_type=%d\n",
__func__, group, to_tell, mnt, mask, data, data_type);
}
static int send_to_group(struct fsnotify_group *group, struct inode *to_tell,
- struct vfsmount *mnt, __u32 mask, void *data,
- int data_is, u32 cookie, const unsigned char *file_name,
+ struct vfsmount *mnt, struct fsnotify_mark *mark,
+ __u32 mask, void *data, int data_is, u32 cookie,
+ const unsigned char *file_name,
struct fsnotify_event **event)
{
- pr_debug("%s: group=%p to_tell=%p mnt=%p mask=%x data=%p data_is=%d"
- " cookie=%d event=%p\n", __func__, group, to_tell, mnt,
- mask, data, data_is, cookie, *event);
+ pr_debug("%s: group=%p to_tell=%p mnt=%p mark=%p mask=%x data=%p"
+ " data_is=%d cookie=%d event=%p\n", __func__, group, to_tell,
+ mnt, mark, mask, data, data_is, cookie, *event);
- if (!group->ops->should_send_event(group, to_tell, mnt, mask,
+ if (!group->ops->should_send_event(group, to_tell, mnt, mark, mask,
data, data_is))
return 0;
if (!*event) {
if (!*event)
return -ENOMEM;
}
- return group->ops->handle_event(group, *event);
+ return group->ops->handle_event(group, mark, *event);
}
static bool needed_by_vfsmount(__u32 test_mask, struct vfsmount *mnt)
group = mark->group;
if (!group)
continue;
- ret = send_to_group(group, to_tell, NULL, mask,
+ ret = send_to_group(group, to_tell, NULL, mark, mask,
data, data_is, cookie, file_name,
&event);
if (ret)
group = mark->group;
if (!group)
continue;
- ret = send_to_group(group, to_tell, mnt, mask,
+ ret = send_to_group(group, to_tell, mnt, mark, mask,
data, data_is, cookie, file_name,
&event);
if (ret)
return last_event;
}
-static int inotify_handle_event(struct fsnotify_group *group, struct fsnotify_event *event)
+static int inotify_handle_event(struct fsnotify_group *group,
+ struct fsnotify_mark *mark,
+ struct fsnotify_event *event)
{
struct fsnotify_mark *fsn_mark;
struct inotify_inode_mark *i_mark;
}
static bool inotify_should_send_event(struct fsnotify_group *group, struct inode *inode,
- struct vfsmount *mnt, __u32 mask, void *data,
- int data_type)
+ struct vfsmount *mnt, struct fsnotify_mark *mark,
+ __u32 mask, void *data, int data_type)
{
struct fsnotify_mark *fsn_mark;
bool send;
*/
struct fsnotify_ops {
bool (*should_send_event)(struct fsnotify_group *group, struct inode *inode,
- struct vfsmount *mnt, __u32 mask, void *data,
- int data_type);
- int (*handle_event)(struct fsnotify_group *group, struct fsnotify_event *event);
+ struct vfsmount *mnt, struct fsnotify_mark *mark,
+ __u32 mask, void *data, int data_type);
+ int (*handle_event)(struct fsnotify_group *group, struct fsnotify_mark *mark,
+ struct fsnotify_event *event);
void (*free_group_priv)(struct fsnotify_group *group);
void (*freeing_mark)(struct fsnotify_mark *mark, struct fsnotify_group *group);
void (*free_event_priv)(struct fsnotify_event_private_data *priv);
mutex_unlock(&audit_filter_mutex);
}
-static int audit_tree_handle_event(struct fsnotify_group *group, struct fsnotify_event *event)
+static int audit_tree_handle_event(struct fsnotify_group *group,
+ struct fsnotify_mark *mark,
+ struct fsnotify_event *event)
{
BUG();
return -EOPNOTSUPP;
}
static bool audit_tree_send_event(struct fsnotify_group *group, struct inode *inode,
- struct vfsmount *mnt, __u32 mask, void *data,
- int data_type)
+ struct vfsmount *mnt, struct fsnotify_mark *mark,
+ __u32 mask, void *data, int data_type)
{
return 0;
}
}
static bool audit_watch_should_send_event(struct fsnotify_group *group, struct inode *inode,
- struct vfsmount *mnt, __u32 mask, void *data,
- int data_type)
+ struct vfsmount *mnt, struct fsnotify_mark *mark,
+ __u32 mask, void *data, int data_type)
{
struct fsnotify_mark *entry;
bool send;
}
/* Update watch data in audit rules based on fsnotify events. */
-static int audit_watch_handle_event(struct fsnotify_group *group, struct fsnotify_event *event)
+static int audit_watch_handle_event(struct fsnotify_group *group,
+ struct fsnotify_mark *mark,
+ struct fsnotify_event *event)
{
struct inode *inode;
__u32 mask = event->mask;