diff options
author | Amir Goldstein | 2022-04-22 15:03:23 +0300 |
---|---|---|
committer | Jan Kara | 2022-04-25 14:43:00 +0200 |
commit | 4adce25ccfff215939ee465b8c0aa70526d5c352 (patch) | |
tree | ee9c2ee15160ba32167218095f31c77b5120f6d5 /fs/notify/fanotify | |
parent | c3638b5b13740fa31762d414bbce8b7a694e582a (diff) |
fanotify: create helper fanotify_mark_user_flags()
To translate from fsnotify mark flags to user visible flags.
Link: https://lore.kernel.org/r/20220422120327.3459282-13-amir73il@gmail.com
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/notify/fanotify')
-rw-r--r-- | fs/notify/fanotify/fanotify.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/notify/fanotify/fanotify.h b/fs/notify/fanotify/fanotify.h index a3d5b751cac5..87142bc0131a 100644 --- a/fs/notify/fanotify/fanotify.h +++ b/fs/notify/fanotify/fanotify.h @@ -490,3 +490,13 @@ static inline unsigned int fanotify_event_hash_bucket( { return event->hash & FANOTIFY_HTABLE_MASK; } + +static inline unsigned int fanotify_mark_user_flags(struct fsnotify_mark *mark) +{ + unsigned int mflags = 0; + + if (mark->flags & FSNOTIFY_MARK_FLAG_IGNORED_SURV_MODIFY) + mflags |= FAN_MARK_IGNORED_SURV_MODIFY; + + return mflags; +} |