Skip to content

Commit

Permalink
take init_fs to saner place
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Dec 31, 2008
1 parent cb23beb commit 18d8fda
Show file tree
Hide file tree
Showing 24 changed files with 8 additions and 27 deletions.
1 change: 0 additions & 1 deletion arch/alpha/kernel/init_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <asm/uaccess.h>


static struct fs_struct init_fs = INIT_FS;
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
Expand Down
1 change: 0 additions & 1 deletion arch/arm/kernel/init_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#include <asm/pgtable.h>

static struct fs_struct init_fs = INIT_FS;
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
Expand Down
1 change: 0 additions & 1 deletion arch/avr32/kernel/init_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

#include <asm/pgtable.h>

static struct fs_struct init_fs = INIT_FS;
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
Expand Down
1 change: 0 additions & 1 deletion arch/blackfin/kernel/init_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <linux/mqueue.h>
#include <linux/fs.h>

static struct fs_struct init_fs = INIT_FS;
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);

Expand Down
1 change: 0 additions & 1 deletion arch/cris/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
* setup.
*/

static struct fs_struct init_fs = INIT_FS;
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
Expand Down
1 change: 0 additions & 1 deletion arch/frv/kernel/init_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <asm/pgtable.h>


static struct fs_struct init_fs = INIT_FS;
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
Expand Down
1 change: 0 additions & 1 deletion arch/h8300/kernel/init_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <asm/uaccess.h>
#include <asm/pgtable.h>

static struct fs_struct init_fs = INIT_FS;
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
Expand Down
1 change: 0 additions & 1 deletion arch/ia64/kernel/init_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <asm/uaccess.h>
#include <asm/pgtable.h>

static struct fs_struct init_fs = INIT_FS;
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
Expand Down
1 change: 0 additions & 1 deletion arch/m32r/kernel/init_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <asm/uaccess.h>
#include <asm/pgtable.h>

static struct fs_struct init_fs = INIT_FS;
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
Expand Down
1 change: 0 additions & 1 deletion arch/m68k/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
* alignment requirements and potentially different initial
* setup.
*/
static struct fs_struct init_fs = INIT_FS;
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
Expand Down
1 change: 0 additions & 1 deletion arch/m68knommu/kernel/init_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <asm/uaccess.h>
#include <asm/pgtable.h>

static struct fs_struct init_fs = INIT_FS;
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
Expand Down
1 change: 0 additions & 1 deletion arch/mips/kernel/init_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <asm/uaccess.h>
#include <asm/pgtable.h>

static struct fs_struct init_fs = INIT_FS;
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
Expand Down
1 change: 0 additions & 1 deletion arch/mn10300/kernel/init_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <asm/uaccess.h>
#include <asm/pgtable.h>

static struct fs_struct init_fs = INIT_FS;
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
Expand Down
1 change: 0 additions & 1 deletion arch/parisc/kernel/init_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <asm/pgtable.h>
#include <asm/pgalloc.h>

static struct fs_struct init_fs = INIT_FS;
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/kernel/init_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <linux/mqueue.h>
#include <asm/uaccess.h>

static struct fs_struct init_fs = INIT_FS;
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
Expand Down
1 change: 0 additions & 1 deletion arch/s390/kernel/init_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <asm/uaccess.h>
#include <asm/pgtable.h>

static struct fs_struct init_fs = INIT_FS;
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
Expand Down
1 change: 0 additions & 1 deletion arch/sh/kernel/init_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <asm/uaccess.h>
#include <asm/pgtable.h>

static struct fs_struct init_fs = INIT_FS;
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct pt_regs fake_swapper_regs;
Expand Down
1 change: 0 additions & 1 deletion arch/sparc/kernel/init_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <asm/pgtable.h>
#include <asm/uaccess.h>

static struct fs_struct init_fs = INIT_FS;
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
Expand Down
1 change: 0 additions & 1 deletion arch/um/kernel/init_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "linux/mqueue.h"
#include "asm/uaccess.h"

static struct fs_struct init_fs = INIT_FS;
struct mm_struct init_mm = INIT_MM(init_mm);
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
Expand Down
1 change: 0 additions & 1 deletion arch/x86/kernel/init_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <asm/pgtable.h>
#include <asm/desc.h>

static struct fs_struct init_fs = INIT_FS;
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
Expand Down
1 change: 0 additions & 1 deletion arch/xtensa/kernel/init_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

#include <asm/uaccess.h>

static struct fs_struct init_fs = INIT_FS;
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
Expand Down
7 changes: 7 additions & 0 deletions fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -2893,3 +2893,10 @@ EXPORT_SYMBOL(vfs_symlink);
EXPORT_SYMBOL(vfs_unlink);
EXPORT_SYMBOL(dentry_unhash);
EXPORT_SYMBOL(generic_readlink);

/* to be mentioned only in INIT_TASK */
struct fs_struct init_fs = {
.count = ATOMIC_INIT(1),
.lock = RW_LOCK_UNLOCKED,
.umask = 0022,
};
6 changes: 0 additions & 6 deletions include/linux/fs_struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ struct fs_struct {
struct path root, pwd;
};

#define INIT_FS { \
.count = ATOMIC_INIT(1), \
.lock = RW_LOCK_UNLOCKED, \
.umask = 0022, \
}

extern struct kmem_cache *fs_cachep;

extern void exit_fs(struct task_struct *);
Expand Down
1 change: 1 addition & 0 deletions include/linux/init_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <net/net_namespace.h>

extern struct files_struct init_files;
extern struct fs_struct init_fs;

#define INIT_KIOCTX(name, which_mm) \
{ \
Expand Down

0 comments on commit 18d8fda

Please sign in to comment.