aboutsummaryrefslogtreecommitdiffstats
path: root/fs/notify/inotify/inotify_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/notify/inotify/inotify_user.c')
-rw-r--r--fs/notify/inotify/inotify_user.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
index 497395c8274b..78a2ca3966c3 100644
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
@@ -495,7 +495,7 @@ void inotify_ignored_and_remove_idr(struct fsnotify_mark *fsn_mark,
495 495
496 /* Queue ignore event for the watch */ 496 /* Queue ignore event for the watch */
497 inotify_handle_event(group, NULL, fsn_mark, NULL, FS_IN_IGNORED, 497 inotify_handle_event(group, NULL, fsn_mark, NULL, FS_IN_IGNORED,
498 NULL, FSNOTIFY_EVENT_NONE, NULL); 498 NULL, FSNOTIFY_EVENT_NONE, NULL, 0);
499 499
500 i_mark = container_of(fsn_mark, struct inotify_inode_mark, fsn_mark); 500 i_mark = container_of(fsn_mark, struct inotify_inode_mark, fsn_mark);
501 /* remove this mark from the idr */ 501 /* remove this mark from the idr */
@@ -633,11 +633,23 @@ static int inotify_update_watch(struct fsnotify_group *group, struct inode *inod
633static struct fsnotify_group *inotify_new_group(unsigned int max_events) 633static struct fsnotify_group *inotify_new_group(unsigned int max_events)
634{ 634{
635 struct fsnotify_group *group; 635 struct fsnotify_group *group;
636 struct inotify_event_info *oevent;
636 637
637 group = fsnotify_alloc_group(&inotify_fsnotify_ops); 638 group = fsnotify_alloc_group(&inotify_fsnotify_ops);
638 if (IS_ERR(group)) 639 if (IS_ERR(group))
639 return group; 640 return group;
640 641
642 oevent = kmalloc(sizeof(struct inotify_event_info), GFP_KERNEL);
643 if (unlikely(!oevent)) {
644 fsnotify_destroy_group(group);
645 return ERR_PTR(-ENOMEM);
646 }
647 group->overflow_event = &oevent->fse;
648 fsnotify_init_event(group->overflow_event, NULL, FS_Q_OVERFLOW);
649 oevent->wd = -1;
650 oevent->sync_cookie = 0;
651 oevent->name_len = 0;
652
641 group->max_events = max_events; 653 group->max_events = max_events;
642 654
643 spin_lock_init(&group->inotify_data.idr_lock); 655 spin_lock_init(&group->inotify_data.idr_lock);