aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/alpha/kernel/smp.c1
-rw-r--r--arch/arm/kernel/setup.c1
-rw-r--r--arch/arm/kernel/smp.c1
-rw-r--r--arch/frv/kernel/sys_frv.c1
-rw-r--r--arch/i386/kernel/microcode.c1
-rw-r--r--arch/i386/kernel/sys_i386.c1
-rw-r--r--arch/i386/kernel/sysenter.c1
-rw-r--r--arch/ia64/kernel/init_task.c1
-rw-r--r--arch/m68k/kernel/process.c1
-rw-r--r--arch/m68k/kernel/sys_m68k.c1
-rw-r--r--arch/mips/kernel/smp.c1
-rw-r--r--arch/mips/kernel/syscall.c1
-rw-r--r--arch/parisc/hpux/fs.c1
-rw-r--r--arch/parisc/kernel/init_task.c1
-rw-r--r--arch/parisc/kernel/process.c1
-rw-r--r--arch/parisc/kernel/smp.c1
-rw-r--r--arch/powerpc/kernel/syscalls.c1
-rw-r--r--arch/powerpc/lib/rheap.c1
-rw-r--r--arch/powerpc/oprofile/cell/spu_task_sync.c1
-rw-r--r--arch/s390/kernel/init_task.c1
-rw-r--r--arch/s390/kernel/process.c1
-rw-r--r--arch/s390/kernel/smp.c1
-rw-r--r--arch/s390/kernel/sys_s390.c1
-rw-r--r--arch/sparc/kernel/init_task.c1
-rw-r--r--arch/sparc64/kernel/init_task.c1
-rw-r--r--arch/sparc64/kernel/process.c1
-rw-r--r--arch/um/drivers/mmapper_kern.c1
-rw-r--r--arch/um/kernel/exec.c1
-rw-r--r--arch/um/kernel/init_task.c1
-rw-r--r--arch/um/kernel/syscall.c1
-rw-r--r--arch/x86_64/ia32/ptrace32.c1
-rw-r--r--arch/x86_64/kernel/process.c1
-rw-r--r--arch/x86_64/kernel/sys_x86_64.c1
-rw-r--r--arch/x86_64/vdso/vma.c1
-rw-r--r--drivers/char/agp/compat_ioctl.c1
-rw-r--r--drivers/char/agp/frontend.c1
-rw-r--r--drivers/char/mmtimer.c1
-rw-r--r--drivers/char/mspec.c1
-rw-r--r--drivers/infiniband/hw/ipath/ipath_diag.c1
-rw-r--r--fs/dcookies.c1
-rw-r--r--include/linux/hugetlb.h2
-rw-r--r--include/linux/mm.h36
-rw-r--r--mm/mmap.c34
-rw-r--r--mm/oom_kill.c1
-rw-r--r--mm/vmstat.c1
45 files changed, 81 insertions, 33 deletions
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
index 0804b6abe203..ad176441be55 100644
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -16,6 +16,7 @@
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/sched.h> 17#include <linux/sched.h>
18#include <linux/mm.h> 18#include <linux/mm.h>
19#include <linux/err.h>
19#include <linux/threads.h> 20#include <linux/threads.h>
20#include <linux/smp.h> 21#include <linux/smp.h>
21#include <linux/interrupt.h> 22#include <linux/interrupt.h>
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 5be2e987b843..4de432ec903a 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -23,6 +23,7 @@
23#include <linux/cpu.h> 23#include <linux/cpu.h>
24#include <linux/interrupt.h> 24#include <linux/interrupt.h>
25#include <linux/smp.h> 25#include <linux/smp.h>
26#include <linux/fs.h>
26 27
27#include <asm/cpu.h> 28#include <asm/cpu.h>
28#include <asm/elf.h> 29#include <asm/elf.h>
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 9746e5293249..eafbb2b05eb8 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -17,6 +17,7 @@
17#include <linux/profile.h> 17#include <linux/profile.h>
18#include <linux/errno.h> 18#include <linux/errno.h>
19#include <linux/mm.h> 19#include <linux/mm.h>
20#include <linux/err.h>
20#include <linux/cpu.h> 21#include <linux/cpu.h>
21#include <linux/smp.h> 22#include <linux/smp.h>
22#include <linux/seq_file.h> 23#include <linux/seq_file.h>
diff --git a/arch/frv/kernel/sys_frv.c b/arch/frv/kernel/sys_frv.c
index 26b3df32b9a7..6fbe2665c577 100644
--- a/arch/frv/kernel/sys_frv.c
+++ b/arch/frv/kernel/sys_frv.c
@@ -13,6 +13,7 @@
13#include <linux/errno.h> 13#include <linux/errno.h>
14#include <linux/sched.h> 14#include <linux/sched.h>
15#include <linux/mm.h> 15#include <linux/mm.h>
16#include <linux/fs.h>
16#include <linux/smp.h> 17#include <linux/smp.h>
17#include <linux/sem.h> 18#include <linux/sem.h>
18#include <linux/msg.h> 19#include <linux/msg.h>
diff --git a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c
index d865d041bea1..09cf78110358 100644
--- a/arch/i386/kernel/microcode.c
+++ b/arch/i386/kernel/microcode.c
@@ -82,6 +82,7 @@
82#include <linux/miscdevice.h> 82#include <linux/miscdevice.h>
83#include <linux/spinlock.h> 83#include <linux/spinlock.h>
84#include <linux/mm.h> 84#include <linux/mm.h>
85#include <linux/fs.h>
85#include <linux/mutex.h> 86#include <linux/mutex.h>
86#include <linux/cpu.h> 87#include <linux/cpu.h>
87#include <linux/firmware.h> 88#include <linux/firmware.h>
diff --git a/arch/i386/kernel/sys_i386.c b/arch/i386/kernel/sys_i386.c
index e5dcb9379018..42147304de88 100644
--- a/arch/i386/kernel/sys_i386.c
+++ b/arch/i386/kernel/sys_i386.c
@@ -9,6 +9,7 @@
9#include <linux/errno.h> 9#include <linux/errno.h>
10#include <linux/sched.h> 10#include <linux/sched.h>
11#include <linux/mm.h> 11#include <linux/mm.h>
12#include <linux/fs.h>
12#include <linux/smp.h> 13#include <linux/smp.h>
13#include <linux/sem.h> 14#include <linux/sem.h>
14#include <linux/msg.h> 15#include <linux/msg.h>
diff --git a/arch/i386/kernel/sysenter.c b/arch/i386/kernel/sysenter.c
index 6deb159d08e0..4eb2e408764f 100644
--- a/arch/i386/kernel/sysenter.c
+++ b/arch/i386/kernel/sysenter.c
@@ -16,6 +16,7 @@
16#include <linux/string.h> 16#include <linux/string.h>
17#include <linux/elf.h> 17#include <linux/elf.h>
18#include <linux/mm.h> 18#include <linux/mm.h>
19#include <linux/err.h>
19#include <linux/module.h> 20#include <linux/module.h>
20 21
21#include <asm/cpufeature.h> 22#include <asm/cpufeature.h>
diff --git a/arch/ia64/kernel/init_task.c b/arch/ia64/kernel/init_task.c
index b69c397ed1bf..bc8efcad28b8 100644
--- a/arch/ia64/kernel/init_task.c
+++ b/arch/ia64/kernel/init_task.c
@@ -8,6 +8,7 @@
8 8
9#include <linux/init.h> 9#include <linux/init.h>
10#include <linux/mm.h> 10#include <linux/mm.h>
11#include <linux/fs.h>
11#include <linux/module.h> 12#include <linux/module.h>
12#include <linux/sched.h> 13#include <linux/sched.h>
13#include <linux/init_task.h> 14#include <linux/init_task.h>
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c
index 99fc1226f7f8..3ee918695215 100644
--- a/arch/m68k/kernel/process.c
+++ b/arch/m68k/kernel/process.c
@@ -15,6 +15,7 @@
15#include <linux/sched.h> 15#include <linux/sched.h>
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/mm.h> 17#include <linux/mm.h>
18#include <linux/fs.h>
18#include <linux/smp.h> 19#include <linux/smp.h>
19#include <linux/smp_lock.h> 20#include <linux/smp_lock.h>
20#include <linux/stddef.h> 21#include <linux/stddef.h>
diff --git a/arch/m68k/kernel/sys_m68k.c b/arch/m68k/kernel/sys_m68k.c
index 90238a8c9e14..36d78cf1a7bc 100644
--- a/arch/m68k/kernel/sys_m68k.c
+++ b/arch/m68k/kernel/sys_m68k.c
@@ -10,6 +10,7 @@
10#include <linux/errno.h> 10#include <linux/errno.h>
11#include <linux/sched.h> 11#include <linux/sched.h>
12#include <linux/mm.h> 12#include <linux/mm.h>
13#include <linux/fs.h>
13#include <linux/smp.h> 14#include <linux/smp.h>
14#include <linux/smp_lock.h> 15#include <linux/smp_lock.h>
15#include <linux/sem.h> 16#include <linux/sem.h>
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index be7362bc2c9a..04bbbd8d91ab 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -30,6 +30,7 @@
30#include <linux/sched.h> 30#include <linux/sched.h>
31#include <linux/cpumask.h> 31#include <linux/cpumask.h>
32#include <linux/cpu.h> 32#include <linux/cpu.h>
33#include <linux/err.h>
33 34
34#include <asm/atomic.h> 35#include <asm/atomic.h>
35#include <asm/cpu.h> 36#include <asm/cpu.h>
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index b53f7edbc159..541b5005957e 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -12,6 +12,7 @@
12#include <linux/errno.h> 12#include <linux/errno.h>
13#include <linux/linkage.h> 13#include <linux/linkage.h>
14#include <linux/mm.h> 14#include <linux/mm.h>
15#include <linux/fs.h>
15#include <linux/smp.h> 16#include <linux/smp.h>
16#include <linux/mman.h> 17#include <linux/mman.h>
17#include <linux/ptrace.h> 18#include <linux/ptrace.h>
diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c
index f2042e6466a4..1263f00dc35d 100644
--- a/arch/parisc/hpux/fs.c
+++ b/arch/parisc/hpux/fs.c
@@ -23,6 +23,7 @@
23 23
24#include <linux/kernel.h> 24#include <linux/kernel.h>
25#include <linux/mm.h> 25#include <linux/mm.h>
26#include <linux/fs.h>
26#include <linux/sched.h> 27#include <linux/sched.h>
27#include <linux/file.h> 28#include <linux/file.h>
28#include <linux/slab.h> 29#include <linux/slab.h>
diff --git a/arch/parisc/kernel/init_task.c b/arch/parisc/kernel/init_task.c
index 8384bf9cecd2..446f98d3fd7b 100644
--- a/arch/parisc/kernel/init_task.c
+++ b/arch/parisc/kernel/init_task.c
@@ -23,6 +23,7 @@
23 */ 23 */
24 24
25#include <linux/mm.h> 25#include <linux/mm.h>
26#include <linux/fs.h>
26#include <linux/module.h> 27#include <linux/module.h>
27#include <linux/sched.h> 28#include <linux/sched.h>
28#include <linux/init.h> 29#include <linux/init.h>
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
index 355664812b83..b80e02a4d81d 100644
--- a/arch/parisc/kernel/process.c
+++ b/arch/parisc/kernel/process.c
@@ -38,6 +38,7 @@
38#include <linux/errno.h> 38#include <linux/errno.h>
39#include <linux/kernel.h> 39#include <linux/kernel.h>
40#include <linux/mm.h> 40#include <linux/mm.h>
41#include <linux/fs.h>
41#include <linux/module.h> 42#include <linux/module.h>
42#include <linux/personality.h> 43#include <linux/personality.h>
43#include <linux/ptrace.h> 44#include <linux/ptrace.h>
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
index 04c7e1d36cea..d7bc7bb42c94 100644
--- a/arch/parisc/kernel/smp.c
+++ b/arch/parisc/kernel/smp.c
@@ -28,6 +28,7 @@
28#include <linux/smp.h> 28#include <linux/smp.h>
29#include <linux/kernel_stat.h> 29#include <linux/kernel_stat.h>
30#include <linux/mm.h> 30#include <linux/mm.h>
31#include <linux/err.h>
31#include <linux/delay.h> 32#include <linux/delay.h>
32#include <linux/bitops.h> 33#include <linux/bitops.h>
33 34
diff --git a/arch/powerpc/kernel/syscalls.c b/arch/powerpc/kernel/syscalls.c
index fc6647d332cb..f85f402ceaef 100644
--- a/arch/powerpc/kernel/syscalls.c
+++ b/arch/powerpc/kernel/syscalls.c
@@ -23,6 +23,7 @@
23#include <linux/sched.h> 23#include <linux/sched.h>
24#include <linux/syscalls.h> 24#include <linux/syscalls.h>
25#include <linux/mm.h> 25#include <linux/mm.h>
26#include <linux/fs.h>
26#include <linux/smp.h> 27#include <linux/smp.h>
27#include <linux/sem.h> 28#include <linux/sem.h>
28#include <linux/msg.h> 29#include <linux/msg.h>
diff --git a/arch/powerpc/lib/rheap.c b/arch/powerpc/lib/rheap.c
index 2f24ea0d723a..ada5b42dd231 100644
--- a/arch/powerpc/lib/rheap.c
+++ b/arch/powerpc/lib/rheap.c
@@ -16,6 +16,7 @@
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/mm.h> 18#include <linux/mm.h>
19#include <linux/err.h>
19#include <linux/slab.h> 20#include <linux/slab.h>
20 21
21#include <asm/rheap.h> 22#include <asm/rheap.h>
diff --git a/arch/powerpc/oprofile/cell/spu_task_sync.c b/arch/powerpc/oprofile/cell/spu_task_sync.c
index 133665754a75..4a890cb42b98 100644
--- a/arch/powerpc/oprofile/cell/spu_task_sync.c
+++ b/arch/powerpc/oprofile/cell/spu_task_sync.c
@@ -21,6 +21,7 @@
21#include <linux/dcookies.h> 21#include <linux/dcookies.h>
22#include <linux/kref.h> 22#include <linux/kref.h>
23#include <linux/mm.h> 23#include <linux/mm.h>
24#include <linux/fs.h>
24#include <linux/module.h> 25#include <linux/module.h>
25#include <linux/notifier.h> 26#include <linux/notifier.h>
26#include <linux/numa.h> 27#include <linux/numa.h>
diff --git a/arch/s390/kernel/init_task.c b/arch/s390/kernel/init_task.c
index d73a74013e73..d494161b05b4 100644
--- a/arch/s390/kernel/init_task.c
+++ b/arch/s390/kernel/init_task.c
@@ -7,6 +7,7 @@
7 */ 7 */
8 8
9#include <linux/mm.h> 9#include <linux/mm.h>
10#include <linux/fs.h>
10#include <linux/module.h> 11#include <linux/module.h>
11#include <linux/sched.h> 12#include <linux/sched.h>
12#include <linux/init_task.h> 13#include <linux/init_task.h>
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index 441975b796fb..abb447a3e472 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -21,6 +21,7 @@
21#include <linux/sched.h> 21#include <linux/sched.h>
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/mm.h> 23#include <linux/mm.h>
24#include <linux/fs.h>
24#include <linux/smp.h> 25#include <linux/smp.h>
25#include <linux/stddef.h> 26#include <linux/stddef.h>
26#include <linux/unistd.h> 27#include <linux/unistd.h>
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 03674fbe598f..35edbef1d222 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -23,6 +23,7 @@
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/mm.h> 25#include <linux/mm.h>
26#include <linux/err.h>
26#include <linux/spinlock.h> 27#include <linux/spinlock.h>
27#include <linux/kernel_stat.h> 28#include <linux/kernel_stat.h>
28#include <linux/delay.h> 29#include <linux/delay.h>
diff --git a/arch/s390/kernel/sys_s390.c b/arch/s390/kernel/sys_s390.c
index 13e27bdb96e2..1eaff84a1eb6 100644
--- a/arch/s390/kernel/sys_s390.c
+++ b/arch/s390/kernel/sys_s390.c
@@ -16,6 +16,7 @@
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <linux/sched.h> 17#include <linux/sched.h>
18#include <linux/mm.h> 18#include <linux/mm.h>
19#include <linux/fs.h>
19#include <linux/smp.h> 20#include <linux/smp.h>
20#include <linux/sem.h> 21#include <linux/sem.h>
21#include <linux/msg.h> 22#include <linux/msg.h>
diff --git a/arch/sparc/kernel/init_task.c b/arch/sparc/kernel/init_task.c
index fc31de66b1c2..d9d4f96360c7 100644
--- a/arch/sparc/kernel/init_task.c
+++ b/arch/sparc/kernel/init_task.c
@@ -1,4 +1,5 @@
1#include <linux/mm.h> 1#include <linux/mm.h>
2#include <linux/fs.h>
2#include <linux/module.h> 3#include <linux/module.h>
3#include <linux/sched.h> 4#include <linux/sched.h>
4#include <linux/init_task.h> 5#include <linux/init_task.h>
diff --git a/arch/sparc64/kernel/init_task.c b/arch/sparc64/kernel/init_task.c
index 329b38fa5c89..90007cf88bac 100644
--- a/arch/sparc64/kernel/init_task.c
+++ b/arch/sparc64/kernel/init_task.c
@@ -1,4 +1,5 @@
1#include <linux/mm.h> 1#include <linux/mm.h>
2#include <linux/fs.h>
2#include <linux/module.h> 3#include <linux/module.h>
3#include <linux/sched.h> 4#include <linux/sched.h>
4#include <linux/init_task.h> 5#include <linux/init_task.h>
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
index fd7899ba1d70..ca7cdfd55f72 100644
--- a/arch/sparc64/kernel/process.c
+++ b/arch/sparc64/kernel/process.c
@@ -18,6 +18,7 @@
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/kallsyms.h> 19#include <linux/kallsyms.h>
20#include <linux/mm.h> 20#include <linux/mm.h>
21#include <linux/fs.h>
21#include <linux/smp.h> 22#include <linux/smp.h>
22#include <linux/stddef.h> 23#include <linux/stddef.h>
23#include <linux/ptrace.h> 24#include <linux/ptrace.h>
diff --git a/arch/um/drivers/mmapper_kern.c b/arch/um/drivers/mmapper_kern.c
index e41a08f04694..867666a02339 100644
--- a/arch/um/drivers/mmapper_kern.c
+++ b/arch/um/drivers/mmapper_kern.c
@@ -12,6 +12,7 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/mm.h> 14#include <linux/mm.h>
15#include <linux/fs.h>
15#include <linux/miscdevice.h> 16#include <linux/miscdevice.h>
16#include <asm/uaccess.h> 17#include <asm/uaccess.h>
17#include "mem_user.h" 18#include "mem_user.h"
diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c
index 356e50f5aaed..ce6828fd396f 100644
--- a/arch/um/kernel/exec.c
+++ b/arch/um/kernel/exec.c
@@ -6,6 +6,7 @@
6#include "linux/slab.h" 6#include "linux/slab.h"
7#include "linux/smp_lock.h" 7#include "linux/smp_lock.h"
8#include "linux/ptrace.h" 8#include "linux/ptrace.h"
9#include "linux/fs.h"
9#include "asm/ptrace.h" 10#include "asm/ptrace.h"
10#include "asm/pgtable.h" 11#include "asm/pgtable.h"
11#include "asm/tlbflush.h" 12#include "asm/tlbflush.h"
diff --git a/arch/um/kernel/init_task.c b/arch/um/kernel/init_task.c
index d4f1d1ab252b..cba516e6c99a 100644
--- a/arch/um/kernel/init_task.c
+++ b/arch/um/kernel/init_task.c
@@ -4,6 +4,7 @@
4 */ 4 */
5 5
6#include "linux/mm.h" 6#include "linux/mm.h"
7#include "linux/fs.h"
7#include "linux/module.h" 8#include "linux/module.h"
8#include "linux/sched.h" 9#include "linux/sched.h"
9#include "linux/init_task.h" 10#include "linux/init_task.h"
diff --git a/arch/um/kernel/syscall.c b/arch/um/kernel/syscall.c
index 237c4eab7cfd..7b3b67333ff3 100644
--- a/arch/um/kernel/syscall.c
+++ b/arch/um/kernel/syscall.c
@@ -7,6 +7,7 @@
7#include "linux/file.h" 7#include "linux/file.h"
8#include "linux/smp_lock.h" 8#include "linux/smp_lock.h"
9#include "linux/mm.h" 9#include "linux/mm.h"
10#include "linux/fs.h"
10#include "linux/utsname.h" 11#include "linux/utsname.h"
11#include "linux/msg.h" 12#include "linux/msg.h"
12#include "linux/shm.h" 13#include "linux/shm.h"
diff --git a/arch/x86_64/ia32/ptrace32.c b/arch/x86_64/ia32/ptrace32.c
index 4de3a54318f4..4a233ad6269c 100644
--- a/arch/x86_64/ia32/ptrace32.c
+++ b/arch/x86_64/ia32/ptrace32.c
@@ -15,6 +15,7 @@
15#include <linux/syscalls.h> 15#include <linux/syscalls.h>
16#include <linux/unistd.h> 16#include <linux/unistd.h>
17#include <linux/mm.h> 17#include <linux/mm.h>
18#include <linux/err.h>
18#include <linux/ptrace.h> 19#include <linux/ptrace.h>
19#include <asm/ptrace.h> 20#include <asm/ptrace.h>
20#include <asm/compat.h> 21#include <asm/compat.h>
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c
index e7ac629d4c46..2842f50cbe3f 100644
--- a/arch/x86_64/kernel/process.c
+++ b/arch/x86_64/kernel/process.c
@@ -23,6 +23,7 @@
23#include <linux/sched.h> 23#include <linux/sched.h>
24#include <linux/kernel.h> 24#include <linux/kernel.h>
25#include <linux/mm.h> 25#include <linux/mm.h>
26#include <linux/fs.h>
26#include <linux/elfcore.h> 27#include <linux/elfcore.h>
27#include <linux/smp.h> 28#include <linux/smp.h>
28#include <linux/slab.h> 29#include <linux/slab.h>
diff --git a/arch/x86_64/kernel/sys_x86_64.c b/arch/x86_64/kernel/sys_x86_64.c
index d067d9a2ad27..4770b7a2052c 100644
--- a/arch/x86_64/kernel/sys_x86_64.c
+++ b/arch/x86_64/kernel/sys_x86_64.c
@@ -6,6 +6,7 @@
6#include <linux/sched.h> 6#include <linux/sched.h>
7#include <linux/syscalls.h> 7#include <linux/syscalls.h>
8#include <linux/mm.h> 8#include <linux/mm.h>
9#include <linux/fs.h>
9#include <linux/smp.h> 10#include <linux/smp.h>
10#include <linux/sem.h> 11#include <linux/sem.h>
11#include <linux/msg.h> 12#include <linux/msg.h>
diff --git a/arch/x86_64/vdso/vma.c b/arch/x86_64/vdso/vma.c
index d4cb83a6c066..ff9333e5fb08 100644
--- a/arch/x86_64/vdso/vma.c
+++ b/arch/x86_64/vdso/vma.c
@@ -4,6 +4,7 @@
4 * Subject to the GPL, v.2 4 * Subject to the GPL, v.2
5 */ 5 */
6#include <linux/mm.h> 6#include <linux/mm.h>
7#include <linux/err.h>
7#include <linux/sched.h> 8#include <linux/sched.h>
8#include <linux/init.h> 9#include <linux/init.h>
9#include <linux/random.h> 10#include <linux/random.h>
diff --git a/drivers/char/agp/compat_ioctl.c b/drivers/char/agp/compat_ioctl.c
index fcb4b1bf0d4e..ecd4248861b9 100644
--- a/drivers/char/agp/compat_ioctl.c
+++ b/drivers/char/agp/compat_ioctl.c
@@ -28,6 +28,7 @@
28 28
29#include <linux/kernel.h> 29#include <linux/kernel.h>
30#include <linux/pci.h> 30#include <linux/pci.h>
31#include <linux/fs.h>
31#include <linux/agpgart.h> 32#include <linux/agpgart.h>
32#include <asm/uaccess.h> 33#include <asm/uaccess.h>
33#include "agp.h" 34#include "agp.h"
diff --git a/drivers/char/agp/frontend.c b/drivers/char/agp/frontend.c
index c7ed617aa7ff..7791e98de51c 100644
--- a/drivers/char/agp/frontend.c
+++ b/drivers/char/agp/frontend.c
@@ -37,6 +37,7 @@
37#include <linux/agpgart.h> 37#include <linux/agpgart.h>
38#include <linux/slab.h> 38#include <linux/slab.h>
39#include <linux/mm.h> 39#include <linux/mm.h>
40#include <linux/fs.h>
40#include <linux/sched.h> 41#include <linux/sched.h>
41#include <asm/uaccess.h> 42#include <asm/uaccess.h>
42#include <asm/pgtable.h> 43#include <asm/pgtable.h>
diff --git a/drivers/char/mmtimer.c b/drivers/char/mmtimer.c
index 6e55cfb9c65a..e60a74c66e3d 100644
--- a/drivers/char/mmtimer.c
+++ b/drivers/char/mmtimer.c
@@ -25,6 +25,7 @@
25#include <linux/init.h> 25#include <linux/init.h>
26#include <linux/errno.h> 26#include <linux/errno.h>
27#include <linux/mm.h> 27#include <linux/mm.h>
28#include <linux/fs.h>
28#include <linux/mmtimer.h> 29#include <linux/mmtimer.h>
29#include <linux/miscdevice.h> 30#include <linux/miscdevice.h>
30#include <linux/posix-timers.h> 31#include <linux/posix-timers.h>
diff --git a/drivers/char/mspec.c b/drivers/char/mspec.c
index c716ef0dd370..c08a4152ee8f 100644
--- a/drivers/char/mspec.c
+++ b/drivers/char/mspec.c
@@ -38,6 +38,7 @@
38#include <linux/miscdevice.h> 38#include <linux/miscdevice.h>
39#include <linux/spinlock.h> 39#include <linux/spinlock.h>
40#include <linux/mm.h> 40#include <linux/mm.h>
41#include <linux/fs.h>
41#include <linux/vmalloc.h> 42#include <linux/vmalloc.h>
42#include <linux/string.h> 43#include <linux/string.h>
43#include <linux/slab.h> 44#include <linux/slab.h>
diff --git a/drivers/infiniband/hw/ipath/ipath_diag.c b/drivers/infiniband/hw/ipath/ipath_diag.c
index a698f1949d10..cf25cdab02f9 100644
--- a/drivers/infiniband/hw/ipath/ipath_diag.c
+++ b/drivers/infiniband/hw/ipath/ipath_diag.c
@@ -44,6 +44,7 @@
44#include <linux/io.h> 44#include <linux/io.h>
45#include <linux/pci.h> 45#include <linux/pci.h>
46#include <linux/vmalloc.h> 46#include <linux/vmalloc.h>
47#include <linux/fs.h>
47#include <asm/uaccess.h> 48#include <asm/uaccess.h>
48 49
49#include "ipath_kernel.h" 50#include "ipath_kernel.h"
diff --git a/fs/dcookies.c b/fs/dcookies.c
index c1208f53bd74..792cbf55fa95 100644
--- a/fs/dcookies.c
+++ b/fs/dcookies.c
@@ -20,6 +20,7 @@
20#include <linux/capability.h> 20#include <linux/capability.h>
21#include <linux/dcache.h> 21#include <linux/dcache.h>
22#include <linux/mm.h> 22#include <linux/mm.h>
23#include <linux/err.h>
23#include <linux/errno.h> 24#include <linux/errno.h>
24#include <linux/dcookies.h> 25#include <linux/dcookies.h>
25#include <linux/mutex.h> 26#include <linux/mutex.h>
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 49b7053043ad..e6a71c82d204 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -1,6 +1,8 @@
1#ifndef _LINUX_HUGETLB_H 1#ifndef _LINUX_HUGETLB_H
2#define _LINUX_HUGETLB_H 2#define _LINUX_HUGETLB_H
3 3
4#include <linux/fs.h>
5
4#ifdef CONFIG_HUGETLB_PAGE 6#ifdef CONFIG_HUGETLB_PAGE
5 7
6#include <linux/mempolicy.h> 8#include <linux/mempolicy.h>
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 3e9e8fec5a41..655094dc9440 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -10,7 +10,6 @@
10#include <linux/mmzone.h> 10#include <linux/mmzone.h>
11#include <linux/rbtree.h> 11#include <linux/rbtree.h>
12#include <linux/prio_tree.h> 12#include <linux/prio_tree.h>
13#include <linux/fs.h>
14#include <linux/mutex.h> 13#include <linux/mutex.h>
15#include <linux/debug_locks.h> 14#include <linux/debug_locks.h>
16#include <linux/backing-dev.h> 15#include <linux/backing-dev.h>
@@ -18,7 +17,9 @@
18 17
19struct mempolicy; 18struct mempolicy;
20struct anon_vma; 19struct anon_vma;
20struct file_ra_state;
21struct user_struct; 21struct user_struct;
22struct writeback_control;
22 23
23#ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ 24#ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */
24extern unsigned long max_mapnr; 25extern unsigned long max_mapnr;
@@ -861,38 +862,7 @@ struct shrinker {
861extern void register_shrinker(struct shrinker *); 862extern void register_shrinker(struct shrinker *);
862extern void unregister_shrinker(struct shrinker *); 863extern void unregister_shrinker(struct shrinker *);
863 864
864/* 865int vma_wants_writenotify(struct vm_area_struct *vma);
865 * Some shared mappigns will want the pages marked read-only
866 * to track write events. If so, we'll downgrade vm_page_prot
867 * to the private version (using protection_map[] without the
868 * VM_SHARED bit).
869 */
870static inline int vma_wants_writenotify(struct vm_area_struct *vma)
871{
872 unsigned int vm_flags = vma->vm_flags;
873
874 /* If it was private or non-writable, the write bit is already clear */
875 if ((vm_flags & (VM_WRITE|VM_SHARED)) != ((VM_WRITE|VM_SHARED)))
876 return 0;
877
878 /* The backer wishes to know when pages are first written to? */
879 if (vma->vm_ops && vma->vm_ops->page_mkwrite)
880 return 1;
881
882 /* The open routine did something to the protections already? */
883 if (pgprot_val(vma->vm_page_prot) !=
884 pgprot_val(protection_map[vm_flags &
885 (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]))
886 return 0;
887
888 /* Specialty mapping? */
889 if (vm_flags & (VM_PFNMAP|VM_INSERTPAGE))
890 return 0;
891
892 /* Can the mapping track the dirty pages? */
893 return vma->vm_file && vma->vm_file->f_mapping &&
894 mapping_cap_account_dirty(vma->vm_file->f_mapping);
895}
896 866
897extern pte_t *FASTCALL(get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl)); 867extern pte_t *FASTCALL(get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl));
898 868
diff --git a/mm/mmap.c b/mm/mmap.c
index 7afc7a7cec6f..b6537211b9cc 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1029,6 +1029,40 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr,
1029} 1029}
1030EXPORT_SYMBOL(do_mmap_pgoff); 1030EXPORT_SYMBOL(do_mmap_pgoff);
1031 1031
1032/*
1033 * Some shared mappigns will want the pages marked read-only
1034 * to track write events. If so, we'll downgrade vm_page_prot
1035 * to the private version (using protection_map[] without the
1036 * VM_SHARED bit).
1037 */
1038int vma_wants_writenotify(struct vm_area_struct *vma)
1039{
1040 unsigned int vm_flags = vma->vm_flags;
1041
1042 /* If it was private or non-writable, the write bit is already clear */
1043 if ((vm_flags & (VM_WRITE|VM_SHARED)) != ((VM_WRITE|VM_SHARED)))
1044 return 0;
1045
1046 /* The backer wishes to know when pages are first written to? */
1047 if (vma->vm_ops && vma->vm_ops->page_mkwrite)
1048 return 1;
1049
1050 /* The open routine did something to the protections already? */
1051 if (pgprot_val(vma->vm_page_prot) !=
1052 pgprot_val(protection_map[vm_flags &
1053 (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]))
1054 return 0;
1055
1056 /* Specialty mapping? */
1057 if (vm_flags & (VM_PFNMAP|VM_INSERTPAGE))
1058 return 0;
1059
1060 /* Can the mapping track the dirty pages? */
1061 return vma->vm_file && vma->vm_file->f_mapping &&
1062 mapping_cap_account_dirty(vma->vm_file->f_mapping);
1063}
1064
1065
1032unsigned long mmap_region(struct file *file, unsigned long addr, 1066unsigned long mmap_region(struct file *file, unsigned long addr,
1033 unsigned long len, unsigned long flags, 1067 unsigned long len, unsigned long flags,
1034 unsigned int vm_flags, unsigned long pgoff, 1068 unsigned int vm_flags, unsigned long pgoff,
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index a7001410ab15..10367654ae77 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -17,6 +17,7 @@
17 17
18#include <linux/oom.h> 18#include <linux/oom.h>
19#include <linux/mm.h> 19#include <linux/mm.h>
20#include <linux/err.h>
20#include <linux/sched.h> 21#include <linux/sched.h>
21#include <linux/swap.h> 22#include <linux/swap.h>
22#include <linux/timex.h> 23#include <linux/timex.h>
diff --git a/mm/vmstat.c b/mm/vmstat.c
index fadf791cd7e6..c64d169537bf 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -10,6 +10,7 @@
10 */ 10 */
11 11
12#include <linux/mm.h> 12#include <linux/mm.h>
13#include <linux/err.h>
13#include <linux/module.h> 14#include <linux/module.h>
14#include <linux/cpu.h> 15#include <linux/cpu.h>
15#include <linux/sched.h> 16#include <linux/sched.h>