diff options
author | Eric Paris <eparis@redhat.com> | 2009-07-07 10:28:23 -0400 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2009-07-21 15:26:26 -0400 |
commit | 5549f7cdf84c02939fd368d0842aa2f472bb6e98 (patch) | |
tree | ca921e8ce50067a4d034eefbf686551215e8504e /fs/notify/inotify | |
parent | aea1f7964ae6cba5eb419a958956deb9016b3341 (diff) |
inotify: drop user watch count when a watch is removed
The inotify rewrite forgot to drop the inotify watch use cound when a watch
was removed. This means that a single inotify fd can only ever register a
maximum of /proc/sys/fs/max_user_watches even if some of those had been
freed.
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'fs/notify/inotify')
-rw-r--r-- | fs/notify/inotify/inotify_user.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index ff27a2965844..1a870f9157b3 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c | |||
@@ -404,6 +404,8 @@ skip_send_ignore: | |||
404 | 404 | ||
405 | /* removed from idr, drop that reference */ | 405 | /* removed from idr, drop that reference */ |
406 | fsnotify_put_mark(entry); | 406 | fsnotify_put_mark(entry); |
407 | |||
408 | atomic_dec(&group->inotify_data.user->inotify_watches); | ||
407 | } | 409 | } |
408 | 410 | ||
409 | /* ding dong the mark is dead */ | 411 | /* ding dong the mark is dead */ |