diff options
-rw-r--r-- | fs/notify/inotify/inotify_user.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index ff231ad23895..ff27a2965844 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c | |||
@@ -296,12 +296,15 @@ static int inotify_fasync(int fd, struct file *file, int on) | |||
296 | static int inotify_release(struct inode *ignored, struct file *file) | 296 | static int inotify_release(struct inode *ignored, struct file *file) |
297 | { | 297 | { |
298 | struct fsnotify_group *group = file->private_data; | 298 | struct fsnotify_group *group = file->private_data; |
299 | struct user_struct *user = group->inotify_data.user; | ||
299 | 300 | ||
300 | fsnotify_clear_marks_by_group(group); | 301 | fsnotify_clear_marks_by_group(group); |
301 | 302 | ||
302 | /* free this group, matching get was inotify_init->fsnotify_obtain_group */ | 303 | /* free this group, matching get was inotify_init->fsnotify_obtain_group */ |
303 | fsnotify_put_group(group); | 304 | fsnotify_put_group(group); |
304 | 305 | ||
306 | atomic_dec(&user->inotify_devs); | ||
307 | |||
305 | return 0; | 308 | return 0; |
306 | } | 309 | } |
307 | 310 | ||