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/inotify | |
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/inotify')
-rw-r--r-- | fs/notify/inotify/inotify_fsnotify.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/notify/inotify/inotify_fsnotify.c b/fs/notify/inotify/inotify_fsnotify.c index 7cf518b25daa..e53f49731b6e 100644 --- a/fs/notify/inotify/inotify_fsnotify.c +++ b/fs/notify/inotify/inotify_fsnotify.c | |||
@@ -90,7 +90,8 @@ static struct fsnotify_event *inotify_merge(struct list_head *list, | |||
90 | } | 90 | } |
91 | 91 | ||
92 | static int inotify_handle_event(struct fsnotify_group *group, | 92 | static int inotify_handle_event(struct fsnotify_group *group, |
93 | struct fsnotify_mark *mark, | 93 | struct fsnotify_mark *inode_mark, |
94 | struct fsnotify_mark *vfsmount_mark, | ||
94 | struct fsnotify_event *event) | 95 | struct fsnotify_event *event) |
95 | { | 96 | { |
96 | struct inotify_inode_mark *i_mark; | 97 | struct inotify_inode_mark *i_mark; |
@@ -100,12 +101,14 @@ static int inotify_handle_event(struct fsnotify_group *group, | |||
100 | struct fsnotify_event *added_event; | 101 | struct fsnotify_event *added_event; |
101 | int wd, ret = 0; | 102 | int wd, ret = 0; |
102 | 103 | ||
104 | BUG_ON(vfsmount_mark); | ||
105 | |||
103 | pr_debug("%s: group=%p event=%p to_tell=%p mask=%x\n", __func__, group, | 106 | pr_debug("%s: group=%p event=%p to_tell=%p mask=%x\n", __func__, group, |
104 | event, event->to_tell, event->mask); | 107 | event, event->to_tell, event->mask); |
105 | 108 | ||
106 | to_tell = event->to_tell; | 109 | to_tell = event->to_tell; |
107 | 110 | ||
108 | i_mark = container_of(mark, struct inotify_inode_mark, | 111 | i_mark = container_of(inode_mark, struct inotify_inode_mark, |
109 | fsn_mark); | 112 | fsn_mark); |
110 | wd = i_mark->wd; | 113 | wd = i_mark->wd; |
111 | 114 | ||
@@ -127,8 +130,8 @@ static int inotify_handle_event(struct fsnotify_group *group, | |||
127 | ret = PTR_ERR(added_event); | 130 | ret = PTR_ERR(added_event); |
128 | } | 131 | } |
129 | 132 | ||
130 | if (mark->mask & IN_ONESHOT) | 133 | if (inode_mark->mask & IN_ONESHOT) |
131 | fsnotify_destroy_mark(mark); | 134 | fsnotify_destroy_mark(inode_mark); |
132 | 135 | ||
133 | return ret; | 136 | return ret; |
134 | } | 137 | } |
@@ -140,6 +143,7 @@ static void inotify_freeing_mark(struct fsnotify_mark *fsn_mark, struct fsnotify | |||
140 | 143 | ||
141 | static bool inotify_should_send_event(struct fsnotify_group *group, struct inode *inode, | 144 | static bool inotify_should_send_event(struct fsnotify_group *group, struct inode *inode, |
142 | struct vfsmount *mnt, struct fsnotify_mark *mark, | 145 | struct vfsmount *mnt, struct fsnotify_mark *mark, |
146 | struct fsnotify_mark *vfsmount_mark, | ||
143 | __u32 mask, void *data, int data_type) | 147 | __u32 mask, void *data, int data_type) |
144 | { | 148 | { |
145 | if ((mark->mask & FS_EXCL_UNLINK) && | 149 | if ((mark->mask & FS_EXCL_UNLINK) && |