diff options
Diffstat (limited to 'fs/notify')
-rw-r--r-- | fs/notify/dnotify/dnotify.c | 3 | ||||
-rw-r--r-- | fs/notify/inode_mark.c | 6 | ||||
-rw-r--r-- | fs/notify/notification.c | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/fs/notify/dnotify/dnotify.c b/fs/notify/dnotify/dnotify.c index 828a889be909..7e54e52964dd 100644 --- a/fs/notify/dnotify/dnotify.c +++ b/fs/notify/dnotify/dnotify.c | |||
@@ -91,6 +91,7 @@ static int dnotify_handle_event(struct fsnotify_group *group, | |||
91 | struct dnotify_struct *dn; | 91 | struct dnotify_struct *dn; |
92 | struct dnotify_struct **prev; | 92 | struct dnotify_struct **prev; |
93 | struct fown_struct *fown; | 93 | struct fown_struct *fown; |
94 | __u32 test_mask = event->mask & ~FS_EVENT_ON_CHILD; | ||
94 | 95 | ||
95 | to_tell = event->to_tell; | 96 | to_tell = event->to_tell; |
96 | 97 | ||
@@ -106,7 +107,7 @@ static int dnotify_handle_event(struct fsnotify_group *group, | |||
106 | spin_lock(&entry->lock); | 107 | spin_lock(&entry->lock); |
107 | prev = &dnentry->dn; | 108 | prev = &dnentry->dn; |
108 | while ((dn = *prev) != NULL) { | 109 | while ((dn = *prev) != NULL) { |
109 | if ((dn->dn_mask & event->mask) == 0) { | 110 | if ((dn->dn_mask & test_mask) == 0) { |
110 | prev = &dn->dn_next; | 111 | prev = &dn->dn_next; |
111 | continue; | 112 | continue; |
112 | } | 113 | } |
diff --git a/fs/notify/inode_mark.c b/fs/notify/inode_mark.c index c8a07c65482b..3165d85aada2 100644 --- a/fs/notify/inode_mark.c +++ b/fs/notify/inode_mark.c | |||
@@ -324,11 +324,11 @@ int fsnotify_add_mark(struct fsnotify_mark_entry *entry, | |||
324 | spin_lock(&group->mark_lock); | 324 | spin_lock(&group->mark_lock); |
325 | spin_lock(&inode->i_lock); | 325 | spin_lock(&inode->i_lock); |
326 | 326 | ||
327 | entry->group = group; | ||
328 | entry->inode = inode; | ||
329 | |||
330 | lentry = fsnotify_find_mark_entry(group, inode); | 327 | lentry = fsnotify_find_mark_entry(group, inode); |
331 | if (!lentry) { | 328 | if (!lentry) { |
329 | entry->group = group; | ||
330 | entry->inode = inode; | ||
331 | |||
332 | hlist_add_head(&entry->i_list, &inode->i_fsnotify_mark_entries); | 332 | hlist_add_head(&entry->i_list, &inode->i_fsnotify_mark_entries); |
333 | list_add(&entry->g_list, &group->mark_entries); | 333 | list_add(&entry->g_list, &group->mark_entries); |
334 | 334 | ||
diff --git a/fs/notify/notification.c b/fs/notify/notification.c index 3816d5750dd5..b8bf53b4c108 100644 --- a/fs/notify/notification.c +++ b/fs/notify/notification.c | |||
@@ -143,7 +143,7 @@ static bool event_compare(struct fsnotify_event *old, struct fsnotify_event *new | |||
143 | /* remember, after old was put on the wait_q we aren't | 143 | /* remember, after old was put on the wait_q we aren't |
144 | * allowed to look at the inode any more, only thing | 144 | * allowed to look at the inode any more, only thing |
145 | * left to check was if the file_name is the same */ | 145 | * left to check was if the file_name is the same */ |
146 | if (old->name_len && | 146 | if (!old->name_len || |
147 | !strcmp(old->file_name, new->file_name)) | 147 | !strcmp(old->file_name, new->file_name)) |
148 | return true; | 148 | return true; |
149 | break; | 149 | break; |