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)
committerSasha Levin <alexander.levin@verizon.com>
Thu, 6 Oct 2016 02:40:20 +0000 (22:40 -0400)
commit05eb9c077253bf285dc2d0daaa4b14d1cf782528
tree53f3f29a2ae5ddf0bf5591c352b6be372e2e96fe
parent8a66ed3130d239398c821263953aaa7cbb8350ca
fsnotify: add a way to stop queueing events on group shutdown

[ Upstream commit 12703dbfeb15402260e7554d32a34ac40c233990 ]

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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
fs/notify/group.c
fs/notify/notification.c
include/linux/fsnotify_backend.h