diff options
| -rw-r--r-- | fs/notify/notification.c | 9 | 
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/notify/notification.c b/fs/notify/notification.c index 959b73e756fd..69391fe8efb1 100644 --- a/fs/notify/notification.c +++ b/fs/notify/notification.c  | |||
| @@ -136,10 +136,15 @@ static bool event_compare(struct fsnotify_event *old, struct fsnotify_event *new | |||
| 136 | { | 136 | { | 
| 137 | if ((old->mask == new->mask) && | 137 | if ((old->mask == new->mask) && | 
| 138 | (old->to_tell == new->to_tell) && | 138 | (old->to_tell == new->to_tell) && | 
| 139 | (old->data_type == new->data_type)) { | 139 | (old->data_type == new->data_type) && | 
| 140 | (old->name_len == new->name_len)) { | ||
| 140 | switch (old->data_type) { | 141 | switch (old->data_type) { | 
| 141 | case (FSNOTIFY_EVENT_INODE): | 142 | case (FSNOTIFY_EVENT_INODE): | 
| 142 | if (old->inode == new->inode) | 143 | /* remember, after old was put on the wait_q we aren't | 
| 144 | * allowed to look at the inode any more, only thing | ||
| 145 | * left to check was if the file_name is the same */ | ||
| 146 | if (old->name_len && | ||
| 147 | !strcmp(old->file_name, new->file_name)) | ||
| 143 | return true; | 148 | return true; | 
| 144 | break; | 149 | break; | 
| 145 | case (FSNOTIFY_EVENT_PATH): | 150 | case (FSNOTIFY_EVENT_PATH): | 
