diff options
author | Eric Paris <eparis@redhat.com> | 2010-07-28 10:18:39 -0400 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-07-28 10:18:54 -0400 |
commit | ce8f76fb7320297ccbe7c950fd9a2d727dd6a5a0 (patch) | |
tree | fb870e9564bfef438e46ba3c39be2999e246b179 /kernel | |
parent | 613a807fe7c793ceb7d6f059773527a5a6c84a96 (diff) |
fsnotify: pass both the vfsmount mark and inode mark
should_send_event() and handle_event() will both need to look up the inode
event if they get a vfsmount event. Lets just pass both at the same time
since we have them both after walking the lists in lockstep.
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/audit_tree.c | 6 | ||||
-rw-r--r-- | kernel/audit_watch.c | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c index 2abb99f3459d..781ab7f4e35c 100644 --- a/kernel/audit_tree.c +++ b/kernel/audit_tree.c | |||
@@ -904,7 +904,8 @@ static void evict_chunk(struct audit_chunk *chunk) | |||
904 | } | 904 | } |
905 | 905 | ||
906 | static int audit_tree_handle_event(struct fsnotify_group *group, | 906 | static int audit_tree_handle_event(struct fsnotify_group *group, |
907 | struct fsnotify_mark *mark, | 907 | struct fsnotify_mark *inode_mark, |
908 | struct fsnotify_mark *vfsmonut_mark, | ||
908 | struct fsnotify_event *event) | 909 | struct fsnotify_event *event) |
909 | { | 910 | { |
910 | BUG(); | 911 | BUG(); |
@@ -920,7 +921,8 @@ static void audit_tree_freeing_mark(struct fsnotify_mark *entry, struct fsnotify | |||
920 | } | 921 | } |
921 | 922 | ||
922 | static bool audit_tree_send_event(struct fsnotify_group *group, struct inode *inode, | 923 | static bool audit_tree_send_event(struct fsnotify_group *group, struct inode *inode, |
923 | struct vfsmount *mnt, struct fsnotify_mark *mark, | 924 | struct vfsmount *mnt, struct fsnotify_mark *inode_mark, |
925 | struct fsnotify_mark *vfsmount_mark, | ||
924 | __u32 mask, void *data, int data_type) | 926 | __u32 mask, void *data, int data_type) |
925 | { | 927 | { |
926 | return false; | 928 | return false; |
diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c index 1b87e757845d..a273cf340527 100644 --- a/kernel/audit_watch.c +++ b/kernel/audit_watch.c | |||
@@ -503,7 +503,8 @@ void audit_remove_watch_rule(struct audit_krule *krule) | |||
503 | } | 503 | } |
504 | 504 | ||
505 | static bool audit_watch_should_send_event(struct fsnotify_group *group, struct inode *inode, | 505 | static bool audit_watch_should_send_event(struct fsnotify_group *group, struct inode *inode, |
506 | struct vfsmount *mnt, struct fsnotify_mark *mark, | 506 | struct vfsmount *mnt, struct fsnotify_mark *inode_mark, |
507 | struct fsnotify_mark *vfsmount_mark, | ||
507 | __u32 mask, void *data, int data_type) | 508 | __u32 mask, void *data, int data_type) |
508 | { | 509 | { |
509 | return true; | 510 | return true; |
@@ -511,7 +512,8 @@ static bool audit_watch_should_send_event(struct fsnotify_group *group, struct i | |||
511 | 512 | ||
512 | /* Update watch data in audit rules based on fsnotify events. */ | 513 | /* Update watch data in audit rules based on fsnotify events. */ |
513 | static int audit_watch_handle_event(struct fsnotify_group *group, | 514 | static int audit_watch_handle_event(struct fsnotify_group *group, |
514 | struct fsnotify_mark *mark, | 515 | struct fsnotify_mark *inode_mark, |
516 | struct fsnotify_mark *vfsmount_mark, | ||
515 | struct fsnotify_event *event) | 517 | struct fsnotify_event *event) |
516 | { | 518 | { |
517 | struct inode *inode; | 519 | struct inode *inode; |
@@ -519,7 +521,7 @@ static int audit_watch_handle_event(struct fsnotify_group *group, | |||
519 | const char *dname = event->file_name; | 521 | const char *dname = event->file_name; |
520 | struct audit_parent *parent; | 522 | struct audit_parent *parent; |
521 | 523 | ||
522 | parent = container_of(mark, struct audit_parent, mark); | 524 | parent = container_of(inode_mark, struct audit_parent, mark); |
523 | 525 | ||
524 | BUG_ON(group != audit_watch_group); | 526 | BUG_ON(group != audit_watch_group); |
525 | 527 | ||