diff options
author | Amir Goldstein <amir73il@gmail.com> | 2023-11-30 19:56:18 +0300 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2023-12-01 12:55:21 +0300 |
commit | 7232522e6cafdf466ed7649c14546fd07ccc1978 (patch) | |
tree | 98ea2a67370b70a911795536b30b5754330b0008 /fs/notify/fanotify/fanotify.h | |
parent | 994d5c58e50e91bb02c7be4a91d5186292a895c8 (diff) | |
download | linux-7232522e6cafdf466ed7649c14546fd07ccc1978.tar.xz |
fanotify: store fsid in mark instead of in connector
Some filesystems like fuse and nfs have zero or non-unique fsid.
We would like to avoid reporting ambiguous fsid in events, so we need
to avoid marking objects with same fsid and different sb.
To make this easier to enforce, store the fsid in the marks of the group
instead of in the shared conenctor.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Message-Id: <20231130165619.3386452-2-amir73il@gmail.com>
Diffstat (limited to 'fs/notify/fanotify/fanotify.h')
-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 6936671e148d..f3b9ef60f0c0 100644 --- a/fs/notify/fanotify/fanotify.h +++ b/fs/notify/fanotify/fanotify.h @@ -489,6 +489,16 @@ static inline unsigned int fanotify_event_hash_bucket( return event->hash & FANOTIFY_HTABLE_MASK; } +struct fanotify_mark { + struct fsnotify_mark fsn_mark; + __kernel_fsid_t fsid; +}; + +static inline struct fanotify_mark *FANOTIFY_MARK(struct fsnotify_mark *mark) +{ + return container_of(mark, struct fanotify_mark, fsn_mark); +} + static inline unsigned int fanotify_mark_user_flags(struct fsnotify_mark *mark) { unsigned int mflags = 0; |