diff options
author | Gabriel Krisman Bertazi <krisman@collabora.com> | 2021-10-25 16:27:23 -0300 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2021-10-27 12:33:37 +0200 |
commit | 808967a0a4d2f4ce6a2005c5692fffbecaf018c1 (patch) | |
tree | 084a80fda4efaa13fdbc7e7235faee2076f9f971 /include/linux/fsnotify_backend.h | |
parent | e0462f91d24756916fded4313d508e0fc52f39c9 (diff) | |
download | linux-808967a0a4d2f4ce6a2005c5692fffbecaf018c1.tar.gz linux-808967a0a4d2f4ce6a2005c5692fffbecaf018c1.tar.bz2 linux-808967a0a4d2f4ce6a2005c5692fffbecaf018c1.zip |
fsnotify: Add helper to detect overflow_event
Similarly to fanotify_is_perm_event and friends, provide a helper
predicate to say whether a mask is of an overflow event.
Link: https://lore.kernel.org/r/20211025192746.66445-9-krisman@collabora.com
Suggested-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'include/linux/fsnotify_backend.h')
-rw-r--r-- | include/linux/fsnotify_backend.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index a2db821e8a8f..749bc85e1d1c 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h @@ -510,6 +510,11 @@ static inline void fsnotify_queue_overflow(struct fsnotify_group *group) fsnotify_add_event(group, group->overflow_event, NULL, NULL); } +static inline bool fsnotify_is_overflow_event(u32 mask) +{ + return mask & FS_Q_OVERFLOW; +} + static inline bool fsnotify_notify_queue_is_empty(struct fsnotify_group *group) { assert_spin_locked(&group->notification_lock); |