android_kernel_xiaomi_sm8450/fs/notify
Amir Goldstein e3bce57ffc fsnotify: introduce mark type iterator
[ Upstream commit 14362a2541797cf9df0e86fb12dcd7950baf566e ]

fsnotify_foreach_iter_mark_type() is used to reduce boilerplate code
of iterating all marks of a specific group interested in an event
by consulting the iterator report_mask.

Use an open coded version of that iterator in fsnotify_iter_next()
that collects all marks of the current iteration group without
consulting the iterator report_mask.

At the moment, the two iterator variants are the same, but this
decoupling will allow us to exclude some of the group's marks from
reporting the event, for example for event on child and inode marks
on parent did not request to watch events on children.

Fixes: 2f02fd3fa1 ("fanotify: fix ignore mask logic for events on child and on dir")
Reported-by: Jan Kara <jack@suse.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20220511190213.831646-2-amir73il@gmail.com
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-21 14:53:41 +02:00
..
dnotify dnotify: use fsnotify group lock helpers 2024-06-21 14:53:40 +02:00
fanotify fsnotify: introduce mark type iterator 2024-06-21 14:53:41 +02:00
inotify inotify: use fsnotify group lock helpers 2024-06-21 14:53:40 +02:00
fdinfo.c fanotify: create helper fanotify_mark_user_flags() 2024-06-21 14:53:40 +02:00
fdinfo.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fsnotify.c fsnotify: introduce mark type iterator 2024-06-21 14:53:41 +02:00
fsnotify.h fsnotify: count all objects with attached connectors 2024-06-21 14:53:17 +02:00
group.c fsnotify: create helpers for group mark_mutex lock 2024-06-21 14:53:39 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mark.c fsnotify: allow adding an inode mark without pinning inode 2024-06-21 14:53:40 +02:00
notification.c fsnotify: Pass group argument to free_event 2024-06-21 14:53:22 +02:00