1 #include <linux/fanotify.h>
2 #include <linux/fsnotify_backend.h>
4 #include <linux/kernel.h>
5 #include <linux/types.h>
7 extern const struct fsnotify_ops fanotify_fsnotify_ops
;
9 static inline bool fanotify_mark_flags_valid(unsigned int flags
)
11 /* must be either and add or a remove */
12 if (!(flags
& (FAN_MARK_ADD
| FAN_MARK_REMOVE
)))
15 /* cannot be both add and remove */
16 if ((flags
& FAN_MARK_ADD
) &&
17 (flags
& FAN_MARK_REMOVE
))
20 /* cannot have more flags than we know about */
21 if (flags
& ~FAN_ALL_MARK_FLAGS
)
27 static inline bool fanotify_mask_valid(__u32 mask
)
29 if (mask
& ~((__u32
)FAN_ALL_INCOMING_EVENTS
))