fsnotify: fix merge with parent's ignored mask
authorAmir Goldstein <amir73il@gmail.com>
Wed, 23 Feb 2022 15:14:37 +0000 (17:14 +0200)
committerJan Kara <jack@suse.cz>
Thu, 24 Feb 2022 13:04:51 +0000 (14:04 +0100)
commit4f0b903ded728c505850daf2914bfc08841f0ae6
tree2d9d04addb7cdc156b2f7c151cfeb22f7f5d11a0
parentdfd42facf1e4ada021b939b4e19c935dcdd55566
fsnotify: fix merge with parent's ignored mask

fsnotify_parent() does not consider the parent's mark at all unless
the parent inode shows interest in events on children and in the
specific event.

So unless parent added an event to both its mark mask and ignored mask,
the event will not be ignored.

Fix this by declaring the interest of an object in an event when the
event is in either a mark mask or ignored mask.

Link: https://lore.kernel.org/r/20220223151438.790268-2-amir73il@gmail.com
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/notify/fanotify/fanotify_user.c
fs/notify/mark.c
include/linux/fsnotify_backend.h