fanotify: use FAN_EVENT_ON_CHILD as implicit flag on sb/mount/non-dir marks
authorAmir Goldstein <amir73il@gmail.com>
Thu, 16 Jul 2020 08:42:15 +0000 (11:42 +0300)
committerJan Kara <jack@suse.cz>
Mon, 27 Jul 2020 19:23:37 +0000 (21:23 +0200)
commit85af5d9258cc5862167c578c63c65ac700a3fa19
tree1e1fa02661ff1fb256add181ddfb6a2862fd5e59
parent4ed6814a91cc71202e3de12cd1cb7cc59f3cee57
fanotify: use FAN_EVENT_ON_CHILD as implicit flag on sb/mount/non-dir marks

Up to now, fanotify allowed to set the FAN_EVENT_ON_CHILD flag on
sb/mount marks and non-directory inode mask, but the flag was ignored.

Mask out the flag if it is provided by user on sb/mount/non-dir marks
and define it as an implicit flag that cannot be removed by user.

This flag is going to be used internally to request for events with
parent and name info.

Link: https://lore.kernel.org/r/20200716084230.30611-8-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