mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
[PATCH] take init_files to fs/file.c
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
f26a398891
commit
f52111b154
25 changed files with 14 additions and 45 deletions
|
@ -9,7 +9,6 @@
|
|||
|
||||
|
||||
static struct fs_struct init_fs = INIT_FS;
|
||||
static struct files_struct init_files = INIT_FILES;
|
||||
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);
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include <asm/pgtable.h>
|
||||
|
||||
static struct fs_struct init_fs = INIT_FS;
|
||||
static struct files_struct init_files = INIT_FILES;
|
||||
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);
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include <asm/pgtable.h>
|
||||
|
||||
static struct fs_struct init_fs = INIT_FS;
|
||||
static struct files_struct init_files = INIT_FILES;
|
||||
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);
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include <linux/fs.h>
|
||||
|
||||
static struct fs_struct init_fs = INIT_FS;
|
||||
static struct files_struct init_files = INIT_FILES;
|
||||
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
|
||||
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
*/
|
||||
|
||||
static struct fs_struct init_fs = INIT_FS;
|
||||
static struct files_struct init_files = INIT_FILES;
|
||||
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);
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
|
||||
static struct fs_struct init_fs = INIT_FS;
|
||||
static struct files_struct init_files = INIT_FILES;
|
||||
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);
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include <asm/pgtable.h>
|
||||
|
||||
static struct fs_struct init_fs = INIT_FS;
|
||||
static struct files_struct init_files = INIT_FILES;
|
||||
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);
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include <asm/pgtable.h>
|
||||
|
||||
static struct fs_struct init_fs = INIT_FS;
|
||||
static struct files_struct init_files = INIT_FILES;
|
||||
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);
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include <asm/pgtable.h>
|
||||
|
||||
static struct fs_struct init_fs = INIT_FS;
|
||||
static struct files_struct init_files = INIT_FILES;
|
||||
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);
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
* setup.
|
||||
*/
|
||||
static struct fs_struct init_fs = INIT_FS;
|
||||
static struct files_struct init_files = INIT_FILES;
|
||||
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);
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include <asm/pgtable.h>
|
||||
|
||||
static struct fs_struct init_fs = INIT_FS;
|
||||
static struct files_struct init_files = INIT_FILES;
|
||||
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);
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include <asm/pgtable.h>
|
||||
|
||||
static struct fs_struct init_fs = INIT_FS;
|
||||
static struct files_struct init_files = INIT_FILES;
|
||||
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);
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include <asm/pgtable.h>
|
||||
|
||||
static struct fs_struct init_fs = INIT_FS;
|
||||
static struct files_struct init_files = INIT_FILES;
|
||||
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);
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include <asm/pgalloc.h>
|
||||
|
||||
static struct fs_struct init_fs = INIT_FS;
|
||||
static struct files_struct init_files = INIT_FILES;
|
||||
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);
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include <asm/uaccess.h>
|
||||
|
||||
static struct fs_struct init_fs = INIT_FS;
|
||||
static struct files_struct init_files = INIT_FILES;
|
||||
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);
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include <asm/pgtable.h>
|
||||
|
||||
static struct fs_struct init_fs = INIT_FS;
|
||||
static struct files_struct init_files = INIT_FILES;
|
||||
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);
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include <asm/pgtable.h>
|
||||
|
||||
static struct fs_struct init_fs = INIT_FS;
|
||||
static struct files_struct init_files = INIT_FILES;
|
||||
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;
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include <asm/uaccess.h>
|
||||
|
||||
static struct fs_struct init_fs = INIT_FS;
|
||||
static struct files_struct init_files = INIT_FILES;
|
||||
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);
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include <asm/processor.h>
|
||||
|
||||
static struct fs_struct init_fs = INIT_FS;
|
||||
static struct files_struct init_files = INIT_FILES;
|
||||
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);
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
|
||||
static struct fs_struct init_fs = INIT_FS;
|
||||
struct mm_struct init_mm = INIT_MM(init_mm);
|
||||
static struct files_struct init_files = INIT_FILES;
|
||||
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
|
||||
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
|
||||
EXPORT_SYMBOL(init_mm);
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include <asm/pgtable.h>
|
||||
|
||||
static struct fs_struct init_fs = INIT_FS;
|
||||
static struct files_struct init_files = INIT_FILES;
|
||||
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);
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include <asm/desc.h>
|
||||
|
||||
static struct fs_struct init_fs = INIT_FS;
|
||||
static struct files_struct init_files = INIT_FILES;
|
||||
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);
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include <asm/uaccess.h>
|
||||
|
||||
static struct fs_struct init_fs = INIT_FS;
|
||||
static struct files_struct init_files = INIT_FILES;
|
||||
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);
|
||||
|
|
13
fs/file.c
13
fs/file.c
|
@ -275,3 +275,16 @@ void __init files_defer_init(void)
|
|||
for_each_possible_cpu(i)
|
||||
fdtable_defer_list_init(i);
|
||||
}
|
||||
|
||||
struct files_struct init_files = {
|
||||
.count = ATOMIC_INIT(1),
|
||||
.fdt = &init_files.fdtab,
|
||||
.fdtab = {
|
||||
.max_fds = NR_OPEN_DEFAULT,
|
||||
.fd = &init_files.fd_array[0],
|
||||
.close_on_exec = (fd_set *)&init_files.close_on_exec_init,
|
||||
.open_fds = (fd_set *)&init_files.open_fds_init,
|
||||
.rcu = RCU_HEAD_INIT,
|
||||
},
|
||||
.file_lock = __SPIN_LOCK_UNLOCKED(init_task.file_lock),
|
||||
};
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef _LINUX__INIT_TASK_H
|
||||
#define _LINUX__INIT_TASK_H
|
||||
|
||||
#include <linux/fdtable.h>
|
||||
#include <linux/rcupdate.h>
|
||||
#include <linux/irqflags.h>
|
||||
#include <linux/utsname.h>
|
||||
|
@ -12,27 +11,7 @@
|
|||
#include <linux/securebits.h>
|
||||
#include <net/net_namespace.h>
|
||||
|
||||
#define INIT_FDTABLE \
|
||||
{ \
|
||||
.max_fds = NR_OPEN_DEFAULT, \
|
||||
.fd = &init_files.fd_array[0], \
|
||||
.close_on_exec = (fd_set *)&init_files.close_on_exec_init, \
|
||||
.open_fds = (fd_set *)&init_files.open_fds_init, \
|
||||
.rcu = RCU_HEAD_INIT, \
|
||||
.next = NULL, \
|
||||
}
|
||||
|
||||
#define INIT_FILES \
|
||||
{ \
|
||||
.count = ATOMIC_INIT(1), \
|
||||
.fdt = &init_files.fdtab, \
|
||||
.fdtab = INIT_FDTABLE, \
|
||||
.file_lock = __SPIN_LOCK_UNLOCKED(init_task.file_lock), \
|
||||
.next_fd = 0, \
|
||||
.close_on_exec_init = { { 0, } }, \
|
||||
.open_fds_init = { { 0, } }, \
|
||||
.fd_array = { NULL, } \
|
||||
}
|
||||
extern struct files_struct init_files;
|
||||
|
||||
#define INIT_KIOCTX(name, which_mm) \
|
||||
{ \
|
||||
|
|
Loading…
Reference in a new issue