Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.infradead.org/users/eparis/notify
Browse files Browse the repository at this point in the history
* 'for-linus' of git://git.infradead.org/users/eparis/notify:
  fs/notify/inotify: decrement user inotify count on close
  • Loading branch information
Linus Torvalds committed Jul 2, 2009
2 parents 5291a12 + bdae997 commit 746a99a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/notify/inotify/inotify_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,15 @@ static int inotify_fasync(int fd, struct file *file, int on)
static int inotify_release(struct inode *ignored, struct file *file)
{
struct fsnotify_group *group = file->private_data;
struct user_struct *user = group->inotify_data.user;

fsnotify_clear_marks_by_group(group);

/* free this group, matching get was inotify_init->fsnotify_obtain_group */
fsnotify_put_group(group);

atomic_dec(&user->inotify_devs);

return 0;
}

Expand Down

0 comments on commit 746a99a

Please sign in to comment.