diff options
author | Gabriel Krisman Bertazi <krisman@collabora.com> | 2021-10-25 22:27:23 +0300 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2021-10-27 13:33:37 +0300 |
commit | 808967a0a4d2f4ce6a2005c5692fffbecaf018c1 (patch) | |
tree | 084a80fda4efaa13fdbc7e7235faee2076f9f971 /fs | |
parent | e0462f91d24756916fded4313d508e0fc52f39c9 (diff) | |
download | linux-808967a0a4d2f4ce6a2005c5692fffbecaf018c1.tar.xz |
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 'fs')
-rw-r--r-- | fs/notify/fanotify/fanotify.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/notify/fanotify/fanotify.h b/fs/notify/fanotify/fanotify.h index 4a5e555dc3d2..c42cf8fd7d79 100644 --- a/fs/notify/fanotify/fanotify.h +++ b/fs/notify/fanotify/fanotify.h @@ -315,7 +315,8 @@ static inline struct path *fanotify_event_path(struct fanotify_event *event) */ static inline bool fanotify_is_hashed_event(u32 mask) { - return !fanotify_is_perm_event(mask) && !(mask & FS_Q_OVERFLOW); + return !(fanotify_is_perm_event(mask) || + fsnotify_is_overflow_event(mask)); } static inline unsigned int fanotify_event_hash_bucket( |