diff options
Diffstat (limited to 'fs/notify/notification.c')
-rw-r--r-- | fs/notify/notification.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/notify/notification.c b/fs/notify/notification.c index 521368574e97..74b3cf30bc6b 100644 --- a/fs/notify/notification.c +++ b/fs/notify/notification.c | |||
@@ -171,9 +171,7 @@ int fsnotify_add_notify_event(struct fsnotify_group *group, struct fsnotify_even | |||
171 | struct list_head *list = &group->notification_list; | 171 | struct list_head *list = &group->notification_list; |
172 | struct fsnotify_event_holder *last_holder; | 172 | struct fsnotify_event_holder *last_holder; |
173 | struct fsnotify_event *last_event; | 173 | struct fsnotify_event *last_event; |
174 | 174 | int ret = 0; | |
175 | /* easy to tell if priv was attached to the event */ | ||
176 | INIT_LIST_HEAD(&priv->event_list); | ||
177 | 175 | ||
178 | /* | 176 | /* |
179 | * There is one fsnotify_event_holder embedded inside each fsnotify_event. | 177 | * There is one fsnotify_event_holder embedded inside each fsnotify_event. |
@@ -194,6 +192,7 @@ alloc_holder: | |||
194 | 192 | ||
195 | if (group->q_len >= group->max_events) { | 193 | if (group->q_len >= group->max_events) { |
196 | event = &q_overflow_event; | 194 | event = &q_overflow_event; |
195 | ret = -EOVERFLOW; | ||
197 | /* sorry, no private data on the overflow event */ | 196 | /* sorry, no private data on the overflow event */ |
198 | priv = NULL; | 197 | priv = NULL; |
199 | } | 198 | } |
@@ -235,7 +234,7 @@ alloc_holder: | |||
235 | mutex_unlock(&group->notification_mutex); | 234 | mutex_unlock(&group->notification_mutex); |
236 | 235 | ||
237 | wake_up(&group->notification_waitq); | 236 | wake_up(&group->notification_waitq); |
238 | return 0; | 237 | return ret; |
239 | } | 238 | } |
240 | 239 | ||
241 | /* | 240 | /* |