aboutsummaryrefslogtreecommitdiffstats
path: root/fs/notify
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2009-06-11 11:09:48 -0400
committerEric Paris <eparis@redhat.com>2009-06-11 14:57:55 -0400
commita092ee20fd33d2df0990dcbf2235afc181612818 (patch)
treec172839ce60bcc55e770e6707694842301e3ed6b /fs/notify
parente42e27736de80045f925564ea27a1d32957219e7 (diff)
fsnotify: allow groups to set freeing_mark to null
Most fsnotify listeners (all but inotify) do not care about marks being freed. Allow groups to set freeing_mark to null and do not call any function if it is set that way. Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'fs/notify')
-rw-r--r--fs/notify/dnotify/dnotify.c8
-rw-r--r--fs/notify/inode_mark.c3
2 files changed, 3 insertions, 8 deletions
diff --git a/fs/notify/dnotify/dnotify.c b/fs/notify/dnotify/dnotify.c
index 98a751614c74..828a889be909 100644
--- a/fs/notify/dnotify/dnotify.c
+++ b/fs/notify/dnotify/dnotify.c
@@ -161,12 +161,6 @@ static bool dnotify_should_send_event(struct fsnotify_group *group,
161 return send; 161 return send;
162} 162}
163 163
164static void dnotify_freeing_mark(struct fsnotify_mark_entry *entry,
165 struct fsnotify_group *group)
166{
167 /* dnotify doesn't care than an inode is on the way out */
168}
169
170static void dnotify_free_mark(struct fsnotify_mark_entry *entry) 164static void dnotify_free_mark(struct fsnotify_mark_entry *entry)
171{ 165{
172 struct dnotify_mark_entry *dnentry = container_of(entry, 166 struct dnotify_mark_entry *dnentry = container_of(entry,
@@ -182,7 +176,7 @@ static struct fsnotify_ops dnotify_fsnotify_ops = {
182 .handle_event = dnotify_handle_event, 176 .handle_event = dnotify_handle_event,
183 .should_send_event = dnotify_should_send_event, 177 .should_send_event = dnotify_should_send_event,
184 .free_group_priv = NULL, 178 .free_group_priv = NULL,
185 .freeing_mark = dnotify_freeing_mark, 179 .freeing_mark = NULL,
186 .free_event_priv = NULL, 180 .free_event_priv = NULL,
187}; 181};
188 182
diff --git a/fs/notify/inode_mark.c b/fs/notify/inode_mark.c
index 0a499d2c6191..c8a07c65482b 100644
--- a/fs/notify/inode_mark.c
+++ b/fs/notify/inode_mark.c
@@ -190,7 +190,8 @@ void fsnotify_destroy_mark_by_entry(struct fsnotify_mark_entry *entry)
190 * callback to the group function to let it know that this entry 190 * callback to the group function to let it know that this entry
191 * is being freed. 191 * is being freed.
192 */ 192 */
193 group->ops->freeing_mark(entry, group); 193 if (group->ops->freeing_mark)
194 group->ops->freeing_mark(entry, group);
194 195
195 /* 196 /*
196 * __fsnotify_update_child_dentry_flags(inode); 197 * __fsnotify_update_child_dentry_flags(inode);