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 /fs/notify/fanotify | |
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 'fs/notify/fanotify')
-rw-r--r-- | fs/notify/fanotify/fanotify.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c index fbd7f35c6134..ef4fa4a45c94 100644 --- a/fs/notify/fanotify/fanotify.c +++ b/fs/notify/fanotify/fanotify.c | |||
@@ -115,7 +115,8 @@ static int fanotify_get_response_from_access(struct fsnotify_group *group, | |||
115 | #endif | 115 | #endif |
116 | 116 | ||
117 | static int fanotify_handle_event(struct fsnotify_group *group, | 117 | static int fanotify_handle_event(struct fsnotify_group *group, |
118 | struct fsnotify_mark *mark, | 118 | struct fsnotify_mark *inode_mark, |
119 | struct fsnotify_mark *fanotify_mark, | ||
119 | struct fsnotify_event *event) | 120 | struct fsnotify_event *event) |
120 | { | 121 | { |
121 | int ret = 0; | 122 | int ret = 0; |
@@ -196,8 +197,11 @@ static bool should_send_inode_event(struct fsnotify_group *group, | |||
196 | return true; | 197 | return true; |
197 | } | 198 | } |
198 | 199 | ||
199 | static bool fanotify_should_send_event(struct fsnotify_group *group, struct inode *to_tell, | 200 | static bool fanotify_should_send_event(struct fsnotify_group *group, |
200 | struct vfsmount *mnt, struct fsnotify_mark *mark, | 201 | struct inode *to_tell, |
202 | struct vfsmount *mnt, | ||
203 | struct fsnotify_mark *inode_mark, | ||
204 | struct fsnotify_mark *vfsmount_mark, | ||
201 | __u32 mask, void *data, int data_type) | 205 | __u32 mask, void *data, int data_type) |
202 | { | 206 | { |
203 | pr_debug("%s: group=%p to_tell=%p mnt=%p mask=%x data=%p data_type=%d\n", | 207 | pr_debug("%s: group=%p to_tell=%p mnt=%p mask=%x data=%p data_type=%d\n", |
@@ -213,9 +217,10 @@ static bool fanotify_should_send_event(struct fsnotify_group *group, struct inod | |||
213 | return false; | 217 | return false; |
214 | 218 | ||
215 | if (mnt) | 219 | if (mnt) |
216 | return should_send_vfsmount_event(group, mnt, to_tell, mark, mask); | 220 | return should_send_vfsmount_event(group, mnt, to_tell, |
221 | vfsmount_mark, mask); | ||
217 | else | 222 | else |
218 | return should_send_inode_event(group, to_tell, mark, mask); | 223 | return should_send_inode_event(group, to_tell, inode_mark, mask); |
219 | } | 224 | } |
220 | 225 | ||
221 | const struct fsnotify_ops fanotify_fsnotify_ops = { | 226 | const struct fsnotify_ops fanotify_fsnotify_ops = { |