Skip to content

Commit 5ad4e53

Browse files
author
Al Viro
committed
Get rid of indirect include of fs_struct.h
Don't pull it in sched.h; very few files actually need it and those can include directly. sched.h itself only needs forward declaration of struct fs_struct; Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent ce3b0f8 commit 5ad4e53

19 files changed

Lines changed: 20 additions & 2 deletions

File tree

‎arch/cris/kernel/process.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include <asm/system.h>
2020
#include <linux/module.h>
2121
#include <linux/spinlock.h>
22-
#include <linux/fs_struct.h>
2322
#include <linux/init_task.h>
2423
#include <linux/sched.h>
2524
#include <linux/fs.h>

‎fs/dcache.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include <linux/seqlock.h>
3333
#include <linux/swap.h>
3434
#include <linux/bootmem.h>
35+
#include <linux/fs_struct.h>
3536
#include "internal.h"
3637

3738
int sysctl_vfs_cache_pressure __read_mostly = 100;

‎fs/exec.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
#include <linux/tracehook.h>
5454
#include <linux/kmod.h>
5555
#include <linux/fsnotify.h>
56+
#include <linux/fs_struct.h>
5657

5758
#include <asm/uaccess.h>
5859
#include <asm/mmu_context.h>

‎fs/fs_struct.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <linux/fs.h>
44
#include <linux/path.h>
55
#include <linux/slab.h>
6+
#include <linux/fs_struct.h>
67

78
/*
89
* Replace the fs->{rootmnt,root} with {mnt,dentry}. Put the old values.

‎fs/namei.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include <linux/file.h>
3333
#include <linux/fcntl.h>
3434
#include <linux/device_cgroup.h>
35+
#include <linux/fs_struct.h>
3536
#include <asm/uaccess.h>
3637

3738
#define ACC_MODE(x) ("\000\004\002\006"[(x)&O_ACCMODE])

‎fs/namespace.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <linux/ramfs.h>
2828
#include <linux/log2.h>
2929
#include <linux/idr.h>
30+
#include <linux/fs_struct.h>
3031
#include <asm/uaccess.h>
3132
#include <asm/unistd.h>
3233
#include "pnode.h"

‎fs/open.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <linux/rcupdate.h>
3030
#include <linux/audit.h>
3131
#include <linux/falloc.h>
32+
#include <linux/fs_struct.h>
3233

3334
int vfs_statfs(struct dentry *dentry, struct kstatfs *buf)
3435
{

‎fs/proc/base.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
#include <linux/oom.h>
8181
#include <linux/elf.h>
8282
#include <linux/pid_namespace.h>
83+
#include <linux/fs_struct.h>
8384
#include "internal.h"
8485

8586
/* NOTE:

‎fs/proc/task_nommu.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include <linux/mm.h>
33
#include <linux/file.h>
44
#include <linux/fdtable.h>
5+
#include <linux/fs_struct.h>
56
#include <linux/mount.h>
67
#include <linux/ptrace.h>
78
#include <linux/seq_file.h>

‎include/linux/mnt_namespace.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ struct proc_mounts {
2222
int event;
2323
};
2424

25+
struct fs_struct;
26+
2527
extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *,
2628
struct fs_struct *);
2729
extern void __put_mnt_ns(struct mnt_namespace *ns);

0 commit comments

Comments
 (0)