fanotify: prepare for setting event flags in ignore mask
authorAmir Goldstein <amir73il@gmail.com>
Wed, 29 Jun 2022 14:42:08 +0000 (17:42 +0300)
committerJan Kara <jack@suse.cz>
Fri, 1 Jul 2022 12:51:13 +0000 (14:51 +0200)
commit31a371e419c885e0f137ce70395356ba8639dc52
tree1e3f37b0fc3c3d5acdd01ef48d8fff091599d743
parentc05787b4c2f80a3bebcb9cdbf255d4fa5c1e24e1
fanotify: prepare for setting event flags in ignore mask

Setting flags FAN_ONDIR FAN_EVENT_ON_CHILD in ignore mask has no effect.
The FAN_EVENT_ON_CHILD flag in mask implicitly applies to ignore mask and
ignore mask is always implicitly applied to events on directories.

Define a mark flag that replaces this legacy behavior with logic of
applying the ignore mask according to event flags in ignore mask.

Implement the new logic to prepare for supporting an ignore mask that
ignores events on children and ignore mask that does not ignore events
on directories.

To emphasize the change in terminology, also rename ignored_mask mark
member to ignore_mask and use accessors to get only the effective
ignored events or the ignored events and flags.

This change in terminology finally aligns with the "ignore mask"
language in man pages and in most of the comments.

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