[RFC PATCH v4 03/12] vfs - move mnt_namespace definition to linux/mount.h

From: Ian Kent
Date: Mon Mar 16 2015 - 22:45:34 EST


From: Ian Kent <ikent@xxxxxxxxxx>

The mnt_namespace definition will be needed by the usermode helper
contained execution implementation, move it to include/linux/mount.h.

Signed-off-by: Ian Kent <ikent@xxxxxxxxxx>
Cc: Benjamin Coddington <bcodding@xxxxxxxxxx>
Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Cc: J. Bruce Fields <bfields@xxxxxxxxxxxx>
Cc: David Howells <dhowells@xxxxxxxxxx>
Cc: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
Cc: Oleg Nesterov <onestero@xxxxxxxxxx>
Cc: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
Cc: Jeff Layton <jeff.layton@xxxxxxxxxxxxxxx>
---
fs/mount.h | 12 ------------
include/linux/mount.h | 14 +++++++++++++-
2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/fs/mount.h b/fs/mount.h
index 6a61c2b..5b8423b 100644
--- a/fs/mount.h
+++ b/fs/mount.h
@@ -1,20 +1,8 @@
#include <linux/mount.h>
#include <linux/seq_file.h>
#include <linux/poll.h>
-#include <linux/ns_common.h>
#include <linux/fs_pin.h>

-struct mnt_namespace {
- atomic_t count;
- struct ns_common ns;
- struct mount * root;
- struct list_head list;
- struct user_namespace *user_ns;
- u64 seq; /* Sequence number to prevent loops */
- wait_queue_head_t poll;
- u64 event;
-};
-
struct mnt_pcp {
int mnt_count;
int mnt_writers;
diff --git a/include/linux/mount.h b/include/linux/mount.h
index c2c561d..39dbcdf 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -15,11 +15,12 @@
#include <linux/spinlock.h>
#include <linux/seqlock.h>
#include <linux/atomic.h>
+#include <linux/ns_common.h>
+#include <linux/wait.h>

struct super_block;
struct vfsmount;
struct dentry;
-struct mnt_namespace;

#define MNT_NOSUID 0x01
#define MNT_NODEV 0x02
@@ -62,6 +63,17 @@ struct mnt_namespace;
#define MNT_SYNC_UMOUNT 0x2000000
#define MNT_MARKED 0x4000000

+struct mnt_namespace {
+ atomic_t count;
+ struct ns_common ns;
+ struct mount * root;
+ struct list_head list;
+ struct user_namespace *user_ns;
+ u64 seq; /* Sequence number to prevent loops */
+ wait_queue_head_t poll;
+ u64 event;
+};
+
struct vfsmount {
struct dentry *mnt_root; /* root of the mounted tree */
struct super_block *mnt_sb; /* pointer to superblock */

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/