summaryrefslogtreecommitdiff
path: root/include/linux/fanotify.h
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2018-09-21 21:20:30 +0300
committerJan Kara <jack@suse.cz>2018-09-27 15:29:00 +0200
commit96a71f21ef1fcc32bea07c612a332a89a213f054 (patch)
tree00bcedff9e9bee4c7cb665b788619a5eec4003e5 /include/linux/fanotify.h
parentd54f4fba889b205e9cd8239182ca5d27d0ac3bc2 (diff)
fanotify: store fanotify_init() flags in group's fanotify_data
This averts the need to re-generate flags in fanotify_show_fdinfo() and sets the scene for addition of more upcoming flags without growing new members to the fanotify_data struct. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'include/linux/fanotify.h')
-rw-r--r--include/linux/fanotify.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/fanotify.h b/include/linux/fanotify.h
index 096c96f4f16a..9c5ea3bdfaa0 100644
--- a/include/linux/fanotify.h
+++ b/include/linux/fanotify.h
@@ -6,4 +6,8 @@
/* not valid from userspace, only kernel internal */
#define FAN_MARK_ONDIR 0x00000100
+
+#define FAN_GROUP_FLAG(group, flag) \
+ ((group)->fanotify_data.flags & (flag))
+
#endif /* _LINUX_FANOTIFY_H */