]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - include/linux/fsnotify_backend.h
fsnotify: generalize handling of extra event flags
authorAmir Goldstein <amir73il@gmail.com>
Wed, 3 Oct 2018 21:25:33 +0000 (00:25 +0300)
committerSultan Alsawaf <sultan.alsawaf@canonical.com>
Wed, 24 Jul 2019 15:44:54 +0000 (09:44 -0600)
commit4449175b2b44cdcd7b5b7fe4114733c22c74dd53
tree23a7d23191bc19bc02f2e2c3242a7b9da164f5fa
parentdcbed4cc1e9152b99bcb5491b0f7d2b3fd7efe16
fsnotify: generalize handling of extra event flags

BugLink: https://bugs.launchpad.net/bugs/1836968
commit 007d1e8395eaa59b0e7ad9eb2b53a40859446a88 upstream.

FS_EVENT_ON_CHILD gets a special treatment in fsnotify() because it is
not a flag specifying an event type, but rather an extra flags that may
be reported along with another event and control the handling of the
event by the backend.

FS_ISDIR is also an "extra flag" and not an "event type" and therefore
desrves the same treatment. With inotify/dnotify backends it was never
possible to set FS_ISDIR in mark masks, so it did not matter.
With fanotify backend, mark adding code jumps through hoops to avoid
setting the FS_ISDIR in the commulative object mask.

Separate the constant ALL_FSNOTIFY_EVENTS to ALL_FSNOTIFY_FLAGS and
ALL_FSNOTIFY_EVENTS, so the latter can be used to test for specific
event types.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/notify/fsnotify.c
include/linux/fsnotify_backend.h