diff options
| author | Christian Brauner <brauner@kernel.org> | 2025-09-12 13:52:41 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-09-19 14:26:15 +0200 |
| commit | 7d7d164989586c0ad61934975c40ca795dc134c7 (patch) | |
| tree | 998970c26496a639515c8bd0af2d9122107610a0 /fs/mount.h | |
| parent | 7914f15c5e45ea6c76f2b3272ff39d8fe67b13f5 (diff) | |
| download | tip-7d7d16498958.tar.gz | |
mnt: support ns lookup
Move the mount namespace to the generic ns lookup infrastructure.
This allows us to drop a bunch of members from struct mnt_namespace.
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/mount.h')
| -rw-r--r-- | fs/mount.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/mount.h b/fs/mount.h index 97737051a8b9df..76bf863c9ae281 100644 --- a/fs/mount.h +++ b/fs/mount.h @@ -17,11 +17,7 @@ struct mnt_namespace { }; struct user_namespace *user_ns; struct ucounts *ucounts; - u64 seq; /* Sequence number to prevent loops */ - union { - wait_queue_head_t poll; - struct rcu_head mnt_ns_rcu; - }; + wait_queue_head_t poll; u64 seq_origin; /* Sequence number of origin mount namespace */ u64 event; #ifdef CONFIG_FSNOTIFY @@ -30,8 +26,6 @@ struct mnt_namespace { #endif unsigned int nr_mounts; /* # of mounts in the namespace */ unsigned int pending_mounts; - struct rb_node mnt_ns_tree_node; /* node in the mnt_ns_tree */ - struct list_head mnt_ns_list; /* entry in the sequential list of mounts namespace */ refcount_t passive; /* number references not pinning @mounts */ } __randomize_layout; @@ -173,7 +167,7 @@ static inline bool is_local_mountpoint(const struct dentry *dentry) static inline bool is_anon_ns(struct mnt_namespace *ns) { - return ns->seq == 0; + return ns->ns.ns_id == 0; } static inline bool anon_ns_root(const struct mount *m) |
