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.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
index 8445fbc8985c..dbafbfc8ceca 100644
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
@@ -293,10 +293,8 @@ static int inotify_release(struct inode *ignored, struct file *file)
293 293
294 pr_debug("%s: group=%p\n", __func__, group); 294 pr_debug("%s: group=%p\n", __func__, group);
295 295
296 fsnotify_clear_marks_by_group(group);
297
298 /* free this group, matching get was inotify_init->fsnotify_obtain_group */ 296 /* free this group, matching get was inotify_init->fsnotify_obtain_group */
299 fsnotify_put_group(group); 297 fsnotify_destroy_group(group);
300 298
301 return 0; 299 return 0;
302} 300}
@@ -712,7 +710,7 @@ static struct fsnotify_group *inotify_new_group(unsigned int max_events)
712 710
713 if (atomic_inc_return(&group->inotify_data.user->inotify_devs) > 711 if (atomic_inc_return(&group->inotify_data.user->inotify_devs) >
714 inotify_max_user_instances) { 712 inotify_max_user_instances) {
715 fsnotify_put_group(group); 713 fsnotify_destroy_group(group);
716 return ERR_PTR(-EMFILE); 714 return ERR_PTR(-EMFILE);
717 } 715 }
718 716
@@ -741,7 +739,7 @@ SYSCALL_DEFINE1(inotify_init1, int, flags)
741 ret = anon_inode_getfd("inotify", &inotify_fops, group, 739 ret = anon_inode_getfd("inotify", &inotify_fops, group,
742 O_RDONLY | flags); 740 O_RDONLY | flags);
743 if (ret < 0) 741 if (ret < 0)
744 fsnotify_put_group(group); 742 fsnotify_destroy_group(group);
745 743
746 return ret; 744 return ret;
747} 745}