Commit b43f3cbd authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Linus Torvalds

headers: mnt_namespace.h redux

Fix various silly problems wrt mnt_namespace.h:

 - exit_mnt_ns() isn't used, remove it
 - done that, sched.h and nsproxy.h inclusions aren't needed
 - mount.h inclusion was need for vfsmount_lock, but no longer
 - remove mnt_namespace.h inclusion from files which don't use anything
   from mnt_namespace.h
Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 622f8061
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include <linux/pagemap.h> #include <linux/pagemap.h>
#include <linux/mount.h> #include <linux/mount.h>
#include <linux/namei.h> #include <linux/namei.h>
#include <linux/mnt_namespace.h>
#include "internal.h" #include "internal.h"
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/seq_file.h> #include <linux/seq_file.h>
#include <linux/mnt_namespace.h> #include <linux/mnt_namespace.h>
#include <linux/namei.h> #include <linux/namei.h>
#include <linux/nsproxy.h>
#include <linux/security.h> #include <linux/security.h>
#include <linux/mount.h> #include <linux/mount.h>
#include <linux/ramfs.h> #include <linux/ramfs.h>
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include <linux/nfs_idmap.h> #include <linux/nfs_idmap.h>
#include <linux/vfs.h> #include <linux/vfs.h>
#include <linux/namei.h> #include <linux/namei.h>
#include <linux/mnt_namespace.h>
#include <linux/security.h> #include <linux/security.h>
#include <asm/system.h> #include <asm/system.h>
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include <linux/exportfs.h> #include <linux/exportfs.h>
#include <linux/quotaops.h> #include <linux/quotaops.h>
#include <linux/vfs.h> #include <linux/vfs.h>
#include <linux/mnt_namespace.h>
#include <linux/mount.h> #include <linux/mount.h>
#include <linux/namei.h> #include <linux/namei.h>
#include <linux/crc32.h> #include <linux/crc32.h>
......
...@@ -2,10 +2,9 @@ ...@@ -2,10 +2,9 @@
#define _NAMESPACE_H_ #define _NAMESPACE_H_
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/mount.h> #include <linux/path.h>
#include <linux/sched.h>
#include <linux/nsproxy.h>
#include <linux/seq_file.h> #include <linux/seq_file.h>
#include <linux/wait.h>
struct mnt_namespace { struct mnt_namespace {
atomic_t count; atomic_t count;
...@@ -28,14 +27,6 @@ extern struct mnt_namespace *create_mnt_ns(struct vfsmount *mnt); ...@@ -28,14 +27,6 @@ extern struct mnt_namespace *create_mnt_ns(struct vfsmount *mnt);
extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *, extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *,
struct fs_struct *); struct fs_struct *);
extern void put_mnt_ns(struct mnt_namespace *ns); extern void put_mnt_ns(struct mnt_namespace *ns);
static inline void exit_mnt_ns(struct task_struct *p)
{
struct mnt_namespace *ns = p->nsproxy->mnt_ns;
if (ns)
put_mnt_ns(ns);
}
static inline void get_mnt_ns(struct mnt_namespace *ns) static inline void get_mnt_ns(struct mnt_namespace *ns)
{ {
atomic_inc(&ns->count); atomic_inc(&ns->count);
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include <linux/completion.h> #include <linux/completion.h>
#include <linux/personality.h> #include <linux/personality.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/mnt_namespace.h>
#include <linux/iocontext.h> #include <linux/iocontext.h>
#include <linux/key.h> #include <linux/key.h>
#include <linux/security.h> #include <linux/security.h>
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/completion.h> #include <linux/completion.h>
#include <linux/mnt_namespace.h>
#include <linux/personality.h> #include <linux/personality.h>
#include <linux/mempolicy.h> #include <linux/mempolicy.h>
#include <linux/sem.h> #include <linux/sem.h>
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include <linux/unistd.h> #include <linux/unistd.h>
#include <linux/kmod.h> #include <linux/kmod.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/mnt_namespace.h>
#include <linux/completion.h> #include <linux/completion.h>
#include <linux/file.h> #include <linux/file.h>
#include <linux/fdtable.h> #include <linux/fdtable.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment