Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5549f7cd authored by Eric Paris's avatar Eric Paris
Browse files

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: default avatarEric Paris <eparis@redhat.com>
parent aea1f796
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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 */