fsnotify: fix ignore mask logic in send_to_group()
authorAmir Goldstein <amir73il@gmail.com>
Thu, 5 Apr 2018 13:18:03 +0000 (16:18 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Jun 2018 19:02:41 +0000 (04:02 +0900)
commitdc94ac5fc41054c16824b01683fade1b77a07c7a
treec72f00b0e21dc5a932d98b5fa19bfacdbca04c47
parent025e42a5e7a318572d0ea2b94b508011bcaff306
fsnotify: fix ignore mask logic in send_to_group()

[ Upstream commit 92183a42898dc400b89da35685d1814ac6acd3d8 ]

The ignore mask logic in send_to_group() does not match the logic
in fanotify_should_send_event(). In the latter, a vfsmount mark ignore
mask precedes an inode mark mask and in the former, it does not.

That difference may cause events to be sent to fanotify backend for no
reason. Fix the logic in send_to_group() to match that of
fanotify_should_send_event().

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/notify/fsnotify.c