fsnotify: add a way to stop queueing events on group shutdown
authorJan Kara <jack@suse.cz>
Mon, 19 Sep 2016 21:44:27 +0000 (14:44 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Sep 2016 08:18:37 +0000 (10:18 +0200)
commitaf426ec184a38d257457a22554542d4f9bb7eecd
tree6947d12bc236bb5f62b27e9da6ecda3d74aaf807
parentfc4edddc5186b74442933c4399cdd6fff914c683
fsnotify: add a way to stop queueing events on group shutdown

commit 12703dbfeb15402260e7554d32a34ac40c233990 upstream.

Implement a function that can be called when a group is being shutdown
to stop queueing new events to the group.  Fanotify will use this.

Fixes: 5838d4442bd5 ("fanotify: fix double free of pending permission events")
Link: http://lkml.kernel.org/r/1473797711-14111-2-git-send-email-jack@suse.cz
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/notify/group.c
fs/notify/notification.c
include/linux/fsnotify_backend.h