linux/fs/notify
Amir Goldstein 43b245a788 fsnotify: create helpers for group mark_mutex lock
Create helpers to take and release the group mark_mutex lock.

Define a flag FSNOTIFY_GROUP_NOFS in fsnotify_group that determines
if the mark_mutex lock is fs reclaim safe or not.  If not safe, the
lock helpers take the lock and disable direct fs reclaim.

In that case we annotate the mutex with a different lockdep class to
express to lockdep that an allocation of mark of an fs reclaim safe group
may take the group lock of another "NOFS" group to evict inodes.

For now, converted only the callers in common code and no backend
defines the NOFS flag.  It is intended to be set by fanotify for
evictable marks support.

Link: https://lore.kernel.org/r/20220422120327.3459282-7-amir73il@gmail.com
Suggested-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20220321112310.vpr7oxro2xkz5llh@quack3.lan/
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
2022-04-25 14:37:22 +02:00
..
dnotify fsnotify: pass flags argument to fsnotify_alloc_group() 2022-04-25 14:37:12 +02:00
fanotify fsnotify: pass flags argument to fsnotify_alloc_group() 2022-04-25 14:37:12 +02:00
inotify fsnotify: pass flags argument to fsnotify_alloc_group() 2022-04-25 14:37:12 +02:00
fdinfo.c fsnotify: create helpers for group mark_mutex lock 2022-04-25 14:37:22 +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 inotify: move control flags from mask to mark flags 2022-04-25 14:37:06 +02:00
fsnotify.h fsnotify: count all objects with attached connectors 2021-08-11 13:50:48 +02:00
group.c fsnotify: create helpers for group mark_mutex lock 2022-04-25 14:37:22 +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: create helpers for group mark_mutex lock 2022-04-25 14:37:22 +02:00
notification.c fsnotify: Pass group argument to free_event 2021-10-27 12:34:18 +02:00