summaryrefslogtreecommitdiff
path: root/include/linux/mount.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mount.h')
-rw-r--r--include/linux/mount.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/mount.h b/include/linux/mount.h
index aaf343b38671..161f4419db6c 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -72,8 +72,15 @@ struct vfsmount {
struct dentry *mnt_root; /* root of the mounted tree */
struct super_block *mnt_sb; /* pointer to superblock */
int mnt_flags;
+ struct user_namespace *mnt_userns;
} __randomize_layout;
+static inline struct user_namespace *mnt_user_ns(const struct vfsmount *mnt)
+{
+ /* Pairs with smp_store_release() in do_idmap_mount(). */
+ return smp_load_acquire(&mnt->mnt_userns);
+}
+
struct file; /* forward dec */
struct path;