Skip to content

Commit

Permalink
inotify: drop user watch count when a watch is removed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Paris committed Jul 21, 2009
1 parent aea1f79 commit 5549f7c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/notify/inotify/inotify_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,8 @@ void inotify_ignored_and_remove_idr(struct fsnotify_mark_entry *entry,

/* removed from idr, drop that reference */
fsnotify_put_mark(entry);

atomic_dec(&group->inotify_data.user->inotify_watches);
}

/* ding dong the mark is dead */
Expand Down

0 comments on commit 5549f7c

Please sign in to comment.