aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2010-07-28 10:18:38 -0400
committerEric Paris <eparis@redhat.com>2010-07-28 10:18:52 -0400
commit3a9b16b407f10b2a771bcae13fb5791e527d6bcf (patch)
tree0d88cac61bd6d3f5028eb0c9a45e7af9fbd24311 /kernel
parent8778abb9a88fc4a74d8776ffaadf7214cf33c61e (diff)
fsnotify: send fsnotify_mark to groups in event handling functions
With the change of fsnotify to use srcu walking the marks list instead of walking the global groups list we now know the mark in question. The code can send the mark to the group's handling functions and the groups won't have to find those marks themselves. Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/audit_tree.c8
-rw-r--r--kernel/audit_watch.c8
2 files changed, 10 insertions, 6 deletions
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c
index cfb97d752a61..584b94360217 100644
--- a/kernel/audit_tree.c
+++ b/kernel/audit_tree.c
@@ -903,7 +903,9 @@ static void evict_chunk(struct audit_chunk *chunk)
903 mutex_unlock(&audit_filter_mutex); 903 mutex_unlock(&audit_filter_mutex);
904} 904}
905 905
906static int audit_tree_handle_event(struct fsnotify_group *group, struct fsnotify_event *event) 906static int audit_tree_handle_event(struct fsnotify_group *group,
907 struct fsnotify_mark *mark,
908 struct fsnotify_event *event)
907{ 909{
908 BUG(); 910 BUG();
909 return -EOPNOTSUPP; 911 return -EOPNOTSUPP;
@@ -918,8 +920,8 @@ static void audit_tree_freeing_mark(struct fsnotify_mark *entry, struct fsnotify
918} 920}
919 921
920static bool audit_tree_send_event(struct fsnotify_group *group, struct inode *inode, 922static bool audit_tree_send_event(struct fsnotify_group *group, struct inode *inode,
921 struct vfsmount *mnt, __u32 mask, void *data, 923 struct vfsmount *mnt, struct fsnotify_mark *mark,
922 int data_type) 924 __u32 mask, void *data, int data_type)
923{ 925{
924 return 0; 926 return 0;
925} 927}
diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c
index b955a22d8ff1..4d5ea0319a6c 100644
--- a/kernel/audit_watch.c
+++ b/kernel/audit_watch.c
@@ -511,8 +511,8 @@ void audit_remove_watch_rule(struct audit_krule *krule)
511} 511}
512 512
513static bool audit_watch_should_send_event(struct fsnotify_group *group, struct inode *inode, 513static bool audit_watch_should_send_event(struct fsnotify_group *group, struct inode *inode,
514 struct vfsmount *mnt, __u32 mask, void *data, 514 struct vfsmount *mnt, struct fsnotify_mark *mark,
515 int data_type) 515 __u32 mask, void *data, int data_type)
516{ 516{
517 struct fsnotify_mark *entry; 517 struct fsnotify_mark *entry;
518 bool send; 518 bool send;
@@ -531,7 +531,9 @@ static bool audit_watch_should_send_event(struct fsnotify_group *group, struct i
531} 531}
532 532
533/* Update watch data in audit rules based on fsnotify events. */ 533/* Update watch data in audit rules based on fsnotify events. */
534static int audit_watch_handle_event(struct fsnotify_group *group, struct fsnotify_event *event) 534static int audit_watch_handle_event(struct fsnotify_group *group,
535 struct fsnotify_mark *mark,
536 struct fsnotify_event *event)
535{ 537{
536 struct inode *inode; 538 struct inode *inode;
537 __u32 mask = event->mask; 539 __u32 mask = event->mask;