Skip to contentSkip to conversation

include <linux/vfs.h> only in files actually needing it

PATCH New Christoph Hellwig 1 participant 1 message Jan 1, 2003

Subsystems (23)
Memory management VFS MIPS NFS client +19 more subsystems
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 include <linux/vfs.h> only in files actually needing it

fs.h only needs the forward-declaration of struct statfs

arch/alpha/kernel/osf_sys.c +1 -0
@@ -35,6 +35,7 @@
 #include <linux/ipc.h>
 #include <linux/namei.h>
 #include <linux/uio.h>
+#include <linux/vfs.h>
 
 #include <asm/fpu.h>
 #include <asm/io.h>
arch/ia64/ia32/sys_ia32.c +1 -0
@@ -48,6 +48,7 @@
 #include <linux/stat.h>
 #include <linux/ipc.h>
 #include <linux/compat.h>
+#include <linux/vfs.h>
 
 #include <asm/types.h>
 #include <asm/uaccess.h>

===== arch/mips/kernel/sysirix.c 1.8 vs edited =====

arch/mips/kernel/sysirix.c +1 -0
@@ -22,6 +22,7 @@
 #include <linux/smp_lock.h>
 #include <linux/utsname.h>
 #include <linux/file.h>
+#include <linux/vfs.h>
 
 #include <asm/ptrace.h>
 #include <asm/page.h>

===== arch/mips64/kernel/linux32.c 1.9 vs edited =====

arch/mips64/kernel/linux32.c +1 -0
@@ -27,6 +27,7 @@
 #include <linux/timex.h>
 #include <linux/dnotify.h>
 #include <linux/compat.h>
+#include <linux/vfs.h>
 #include <net/sock.h>
 
 #include <asm/uaccess.h>

===== arch/parisc/hpux/sys_hpux.c 1.4 vs edited =====

arch/parisc/hpux/sys_hpux.c +1 -0
@@ -10,6 +10,7 @@
 #include <linux/smp_lock.h>
 #include <linux/utsname.h>
 #include <linux/vmalloc.h>
+#include <linux/vfs.h>
 
 #include <asm/errno.h>
 #include <asm/pgalloc.h>

===== arch/parisc/kernel/sys_parisc32.c 1.3 vs edited =====

arch/parisc/kernel/sys_parisc32.c +1 -0
@@ -52,6 +52,7 @@
 #include <linux/mman.h>
 #include <linux/binfmts.h>
 #include <linux/namei.h>
+#include <linux/vfs.h>
 
 #include <asm/types.h>
 #include <asm/uaccess.h>

===== arch/s390x/kernel/linux32.c 1.27 vs edited =====

arch/s390x/kernel/linux32.c +1 -0
@@ -57,6 +57,7 @@
 #include <linux/sysctl.h>
 #include <linux/binfmts.h>
 #include <linux/compat.h>
+#include <linux/vfs.h>
 
 #include <asm/types.h>
 #include <asm/ipc.h>

===== arch/sparc64/kernel/sys_sparc32.c 1.52 vs edited =====

arch/sparc64/kernel/sys_sparc32.c +1 -0
@@ -52,6 +52,7 @@
 #include <linux/dnotify.h>
 #include <linux/security.h>
 #include <linux/compat.h>
+#include <linux/vfs.h>
 
 #include <asm/types.h>
 #include <asm/ipc.h>

===== arch/sparc64/solaris/fs.c 1.13 vs edited =====

arch/sparc64/solaris/fs.c +1 -0
@@ -20,6 +20,7 @@
 #include <linux/resource.h>
 #include <linux/quotaops.h>
 #include <linux/mount.h>
+#include <linux/vfs.h>
 
 #include <asm/uaccess.h>
 #include <asm/string.h>

===== arch/x86_64/ia32/sys_ia32.c 1.12 vs edited =====

arch/x86_64/ia32/sys_ia32.c +1 -0
@@ -58,6 +58,7 @@
 #include <linux/init.h>
 #include <linux/aio_abi.h>
 #include <linux/compat.h>
+#include <linux/vfs.h>
 #include <asm/mman.h>
 #include <asm/types.h>
 #include <asm/uaccess.h>
fs/libfs.c +1 -1
@@ -4,7 +4,7 @@
  */
 
 #include <linux/pagemap.h>
-#include <linux/smp_lock.h>
+#include <linux/vfs.h>
 
 int simple_getattr(struct vfsmount *mnt, struct dentry *dentry,
 		   struct kstat *stat)

===== fs/open.c 1.34 vs edited =====

fs/open.c +1 -1
@@ -18,7 +18,7 @@
 #include <linux/backing-dev.h>
 #include <linux/security.h>
 #include <linux/mount.h>
-
+#include <linux/vfs.h>
 #include <asm/uaccess.h>
 
 #define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m))

===== fs/super.c 1.91 vs edited =====

fs/super.c +1 -0
@@ -30,6 +30,7 @@
 #include <linux/buffer_head.h>		/* for fsync_super() */
 #include <linux/mount.h>
 #include <linux/security.h>
+#include <linux/vfs.h>
 #include <asm/uaccess.h>
 
 

===== fs/adfs/super.c 1.20 vs edited =====

fs/adfs/super.c +1 -0
@@ -18,6 +18,7 @@
 #include <linux/string.h>
 #include <linux/init.h>
 #include <linux/buffer_head.h>
+#include <linux/vfs.h>
 
 #include <asm/bitops.h>
 #include <asm/uaccess.h>

===== fs/affs/super.c 1.31 vs edited =====

fs/affs/super.c +1 -0
@@ -27,6 +27,7 @@
 #include <linux/init.h>
 #include <linux/smp_lock.h>
 #include <linux/buffer_head.h>
+#include <linux/vfs.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
 

===== fs/befs/linuxvfs.c 1.3 vs edited =====

fs/befs/linuxvfs.c +1 -0
@@ -12,6 +12,7 @@
 #include <linux/stat.h>
 #include <linux/nls.h>
 #include <linux/buffer_head.h>
+#include <linux/statfs.h>
 
 #include "befs.h"
 #include "btree.h"

===== fs/bfs/inode.c 1.22 vs edited =====

fs/bfs/inode.c +1 -0
@@ -12,6 +12,7 @@
 #include <linux/fs.h>
 #include <linux/smp_lock.h>
 #include <linux/buffer_head.h>
+#include <linux/vfs.h>
 #include <asm/uaccess.h>
 #include "bfs.h"
 

===== fs/cifs/cifsfs.c 1.4 vs edited =====

fs/cifs/cifsfs.c +1 -0
@@ -31,6 +31,7 @@
 #include <linux/version.h>
 #include <linux/list.h>
 #include <linux/seq_file.h>
+#include <linux/vfs.h>
 #include "cifsfs.h"
 #include "cifspdu.h"
 #define DECLARE_GLOBALS_HERE

===== fs/cifs/cifsproto.h 1.4 vs edited =====

fs/cifs/cifsproto.h +2 -0
@@ -22,6 +22,8 @@
 #define _CIFSPROTO_H
 #include <linux/nls.h>
 
+struct statfs;
+
 /*
  *****************************************************************
  * All Prototypes

===== fs/cifs/cifssmb.c 1.5 vs edited =====

fs/cifs/cifssmb.c +1 -0
@@ -25,6 +25,7 @@
 
 #include <linux/fs.h>
 #include <linux/kernel.h>
+#include <linux/vfs.h>
 #include <asm/uaccess.h>
 #include "cifspdu.h"
 #include "cifsglob.h"

===== fs/coda/inode.c 1.22 vs edited =====

fs/coda/inode.c +1 -0
@@ -17,6 +17,7 @@
 #include <linux/unistd.h>
 #include <linux/smp_lock.h>
 #include <linux/file.h>
+#include <linux/vfs.h>
 
 #include <asm/system.h>
 #include <asm/uaccess.h>

===== fs/coda/upcall.c 1.12 vs edited =====

fs/coda/upcall.c +1 -0
@@ -29,6 +29,7 @@
 #include <linux/string.h>
 #include <asm/uaccess.h>
 #include <linux/vmalloc.h>
+#include <linux/vfs.h>
 
 #include <linux/coda.h>
 #include <linux/coda_linux.h>

===== fs/cramfs/inode.c 1.24 vs edited =====

fs/cramfs/inode.c +1 -0
@@ -22,6 +22,7 @@
 #include <linux/slab.h>
 #include <linux/cramfs_fs_sb.h>
 #include <linux/buffer_head.h>
+#include <linux/vfs.h>
 #include <asm/semaphore.h>
 
 #include <asm/uaccess.h>
fs/efs/super.c +1 -0
@@ -13,6 +13,7 @@
 #include <linux/efs_fs_sb.h>
 #include <linux/slab.h>
 #include <linux/buffer_head.h>
+#include <linux/vfs.h>
 
 static struct super_block *efs_get_sb(struct file_system_type *fs_type,
 	int flags, char *dev_name, void *data)

===== fs/ext2/super.c 1.42 vs edited =====

fs/ext2/super.c +1 -0
@@ -25,6 +25,7 @@
 #include <linux/random.h>
 #include <linux/buffer_head.h>
 #include <linux/smp_lock.h>
+#include <linux/vfs.h>
 #include <asm/uaccess.h>
 #include "ext2.h"
 #include "xattr.h"

===== fs/ext3/super.c 1.48 vs edited =====

fs/ext3/super.c +1 -0
@@ -29,6 +29,7 @@
 #include <linux/blkdev.h>
 #include <linux/smp_lock.h>
 #include <linux/buffer_head.h>
+#include <linux/vfs.h>
 #include <asm/uaccess.h>
 #include "xattr.h"
 #include "acl.h"

===== fs/fat/inode.c 1.59 vs edited =====

fs/fat/inode.c +1 -0
@@ -19,6 +19,7 @@
 #include <linux/pagemap.h>
 #include <linux/buffer_head.h>
 #include <linux/mount.h>
+#include <linux/vfs.h>
 #include <asm/unaligned.h>
 
 /*

===== fs/freevxfs/vxfs_super.c 1.12 vs edited =====

fs/freevxfs/vxfs_super.c +1 -0
@@ -41,6 +41,7 @@
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/stat.h>
+#include <linux/vfs.h>
 
 #include "vxfs.h"
 #include "vxfs_extern.h"

===== fs/hfs/super.c 1.19 vs edited =====

fs/hfs/super.c +1 -0
@@ -32,6 +32,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/smp_lock.h>
+#include <linux/vfs.h>
 
 MODULE_LICENSE("GPL");
 

===== fs/hpfs/hpfs_fn.h 1.12 vs edited =====

fs/hpfs/hpfs_fn.h +2 -0
@@ -162,6 +162,8 @@
 	return 0;
 }
 
+struct statfs;
+
 /* alloc.c */
 
 int hpfs_chk_sectors(struct super_block *, secno, int, char *);

===== fs/hpfs/super.c 1.23 vs edited =====

fs/hpfs/super.c +1 -0
@@ -11,6 +11,7 @@
 #include "hpfs_fn.h"
 #include <linux/module.h>
 #include <linux/init.h>
+#include <linux/vfs.h>
 
 /* Mark the filesystem dirty, so that chkdsk checks it when os/2 booted */
 

===== fs/isofs/inode.c 1.29 vs edited =====

fs/isofs/inode.c +1 -1
@@ -28,7 +28,7 @@
 #include <linux/smp_lock.h>
 #include <linux/blkdev.h>
 #include <linux/buffer_head.h>
-
+#include <linux/vfs.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
 

===== fs/jffs/inode-v23.c 1.43 vs edited =====

fs/jffs/inode-v23.c +1 -0
@@ -48,6 +48,7 @@
 #include <linux/blkdev.h>
 #include <linux/quotaops.h>
 #include <linux/highmem.h>
+#include <linux/vfs.h>
 #include <asm/semaphore.h>
 #include <asm/byteorder.h>
 #include <asm/uaccess.h>

===== fs/jffs2/fs.c 1.10 vs edited =====

fs/jffs2/fs.c +1 -0
@@ -20,6 +20,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/pagemap.h>
 #include <linux/slab.h>
+#include <linux/vfs.h>
 #include "nodelist.h"
 
 int jffs2_statfs(struct super_block *sb, struct statfs *buf)

===== fs/jffs2/os-linux.h 1.7 vs edited =====

fs/jffs2/os-linux.h +1 -0
@@ -96,6 +96,7 @@
 #define jffs2_flash_write_oob(c, ofs, len, retlen, buf) ((c)->mtd->write_oob((c)->mtd, ofs, len, retlen, buf))
 #define jffs2_flash_read_oob(c, ofs, len, retlen, buf) ((c)->mtd->read_oob((c)->mtd, ofs, len, retlen, buf))
 
+struct statfs;
 
 /* wbuf.c */
 int jffs2_flash_writev(struct jffs2_sb_info *c, const struct iovec *vecs, unsigned long count, loff_t to, size_t *retlen);

===== fs/jfs/super.c 1.30 vs edited =====

fs/jfs/super.c +2 -0
@@ -21,7 +21,9 @@
 #include <linux/config.h>
 #include <linux/module.h>
 #include <linux/completion.h>
+#include <linux/vfs.h>
 #include <asm/uaccess.h>
+
 #include "jfs_incore.h"
 #include "jfs_filsys.h"
 #include "jfs_metapage.h"

===== fs/minix/inode.c 1.31 vs edited =====

fs/minix/inode.c +1 -0
@@ -15,6 +15,7 @@
 #include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/highuid.h>
+#include <linux/vfs.h>
 
 static void minix_read_inode(struct inode * inode);
 static void minix_write_inode(struct inode * inode, int wait);

===== fs/ncpfs/inode.c 1.38 vs edited =====

fs/ncpfs/inode.c +1 -0
@@ -28,6 +28,7 @@
 #include <linux/vmalloc.h>
 #include <linux/init.h>
 #include <linux/smp_lock.h>
+#include <linux/vfs.h>
 
 #include <linux/ncp_fs.h>
 

===== fs/nfs/inode.c 1.68 vs edited =====

fs/nfs/inode.c +1 -0
@@ -33,6 +33,7 @@
 #include <linux/smp_lock.h>
 #include <linux/seq_file.h>
 #include <linux/mount.h>
+#include <linux/vfs.h>
 
 #include <asm/system.h>
 #include <asm/uaccess.h>

===== fs/nfsd/nfs3xdr.c 1.27 vs edited =====

fs/nfsd/nfs3xdr.c +1 -1
@@ -14,7 +14,7 @@
 #include <linux/dcache.h>
 #include <linux/namei.h>
 #include <linux/mm.h>
-
+#include <linux/vfs.h>
 #include <linux/sunrpc/xdr.h>
 #include <linux/sunrpc/svc.h>
 #include <linux/nfsd/nfsd.h>

===== fs/nfsd/nfs4xdr.c 1.6 vs edited =====

fs/nfsd/nfs4xdr.c +1 -1
@@ -48,7 +48,7 @@
 #include <linux/compatmac.h>
 #include <linux/fs.h>
 #include <linux/namei.h>
-
+#include <linux/vfs.h>
 #include <linux/sunrpc/xdr.h>
 #include <linux/sunrpc/svc.h>
 #include <linux/sunrpc/clnt.h>

===== fs/nfsd/nfsxdr.c 1.21 vs edited =====

fs/nfsd/nfsxdr.c +1 -1
@@ -9,7 +9,7 @@
 #include <linux/types.h>
 #include <linux/time.h>
 #include <linux/nfs.h>
-
+#include <linux/vfs.h>
 #include <linux/sunrpc/xdr.h>
 #include <linux/sunrpc/svc.h>
 #include <linux/nfsd/nfsd.h>

===== fs/nfsd/vfs.c 1.53 vs edited =====

fs/nfsd/vfs.c +1 -1
@@ -34,7 +34,7 @@
 #include <linux/in.h>
 #include <linux/module.h>
 #include <linux/namei.h>
-
+#include <linux/vfs.h>
 #include <linux/sunrpc/svc.h>
 #include <linux/nfsd/nfsd.h>
 #ifdef CONFIG_NFSD_V3

===== fs/ntfs/super.c 1.121 vs edited =====

fs/ntfs/super.c +1 -0
@@ -27,6 +27,7 @@
 #include <linux/blkdev.h>	/* For bdev_hardsect_size(). */
 #include <linux/backing-dev.h>
 #include <linux/buffer_head.h>
+#include <linux/vfs.h>
 
 #include "ntfs.h"
 #include "sysctl.h"
fs/qnx4/inode.c +1 -1
@@ -25,7 +25,7 @@
 #include <linux/smp_lock.h>
 #include <linux/pagemap.h>
 #include <linux/buffer_head.h>
-
+#include <linux/vfs.h>
 #include <asm/uaccess.h>
 
 #define QNX4_VERSION  4

===== fs/reiserfs/super.c 1.56 vs edited =====

fs/reiserfs/super.c +1 -0
@@ -21,6 +21,7 @@
 #include <linux/init.h>
 #include <linux/blkdev.h>
 #include <linux/buffer_head.h>
+#include <linux/vfs.h>
 
 #define REISERFS_OLD_BLOCKSIZE 4096
 #define REISERFS_SUPER_MAGIC_STRING_OFFSET_NJ 20

===== fs/smbfs/inode.c 1.36 vs edited =====

fs/smbfs/inode.c +1 -1
@@ -24,7 +24,7 @@
 #include <linux/seq_file.h>
 #include <linux/mount.h>
 #include <linux/net.h>
-
+#include <linux/vfs.h>
 #include <linux/smb_fs.h>
 #include <linux/smbno.h>
 #include <linux/smb_mount.h>

===== fs/smbfs/proc.c 1.26 vs edited =====

fs/smbfs/proc.c +1 -1
@@ -19,7 +19,7 @@
 #include <linux/nls.h>
 #include <linux/smp_lock.h>
 #include <linux/net.h>
-
+#include <linux/vfs.h>
 #include <linux/smb_fs.h>
 #include <linux/smbno.h>
 #include <linux/smb_mount.h>

===== fs/smbfs/proto.h 1.7 vs edited =====

fs/smbfs/proto.h +1 -0
@@ -4,6 +4,7 @@
 
 struct smb_request;
 struct sock;
+struct statfs;
 
 /* proc.c */
 extern int smb_setcodepage(struct smb_sb_info *server, struct smb_nls_codepage *cp);

===== fs/sysv/inode.c 1.24 vs edited =====

fs/sysv/inode.c +1 -0
@@ -26,6 +26,7 @@
 #include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/buffer_head.h>
+#include <linux/vfs.h>
 #include <asm/byteorder.h>
 #include "sysv.h"
 

===== fs/udf/super.c 1.30 vs edited =====

fs/udf/super.c +1 -0
@@ -56,6 +56,7 @@
 #include <linux/nls.h>
 #include <linux/smp_lock.h>
 #include <linux/buffer_head.h>
+#include <linux/vfs.h>
 #include <asm/byteorder.h>
 
 #include <linux/udf_fs.h>

===== fs/ufs/super.c 1.32 vs edited =====

fs/ufs/super.c +1 -0
@@ -81,6 +81,7 @@
 #include <linux/init.h>
 #include <linux/smp_lock.h>
 #include <linux/buffer_head.h>
+#include <linux/vfs.h>
 
 #include "swab.h"
 #include "util.h"

===== fs/xfs/linux/xfs_linux.h 1.10 vs edited =====

fs/xfs/linux/xfs_linux.h +1 -0
@@ -42,6 +42,7 @@
 #include <linux/sched.h>
 #include <linux/bitops.h>
 #include <linux/major.h>
+#include <linux/vfs.h>
 
 #include <asm/page.h>
 #include <asm/div64.h>

===== include/linux/coda_psdev.h 1.5 vs edited =====

include/linux/coda_psdev.h +2 -0
@@ -6,6 +6,8 @@
 
 #define CODA_SUPER_MAGIC	0x73757245
 
+struct statfs;
+
 struct coda_sb_info
 {
 	struct venus_comm * sbi_vcomm;

===== include/linux/efs_fs.h 1.7 vs edited =====

include/linux/efs_fs.h +2 -0
@@ -49,6 +49,8 @@
 	return sb->s_fs_info;
 }
 
+struct statfs;
+
 extern struct inode_operations efs_dir_inode_operations;
 extern struct file_operations efs_dir_operations;
 extern struct address_space_operations efs_symlink_aops;

===== include/linux/ext3_fs.h 1.20 vs edited =====

include/linux/ext3_fs.h +3 -0
@@ -20,6 +20,9 @@
 #include <linux/ext3_fs_i.h>
 #include <linux/ext3_fs_sb.h>
 
+
+struct statfs;
+
 /*
  * The second extended filesystem constants/structures
  */

===== include/linux/fs.h 1.207 vs edited =====

include/linux/fs.h +1 -1
@@ -11,7 +11,6 @@
 #include <linux/limits.h>
 #include <linux/wait.h>
 #include <linux/types.h>
-#include <linux/vfs.h>
 #include <linux/kdev_t.h>
 #include <linux/ioctl.h>
 #include <linux/list.h>
@@ -25,6 +25,7 @@
 struct nameidata;
 struct pipe_inode_info;
 struct poll_table_struct;
+struct statfs;
 struct vm_area_struct;
 struct vfsmount;
 
include/linux/msdos_fs.h +3 -0
@@ -8,6 +8,9 @@
 #include <linux/string.h>
 #include <asm/byteorder.h>
 
+struct statfs;
+
+
 #define SECTOR_SIZE	512		/* sector size (bytes) */
 #define SECTOR_BITS	9		/* log2(SECTOR_SIZE) */
 #define MSDOS_DPB	(MSDOS_DPS)	/* dir entries per block */

===== include/linux/nfsd/xdr.h 1.7 vs edited =====

include/linux/nfsd/xdr.h +1 -0
@@ -8,6 +8,7 @@
 #define LINUX_NFSD_H
 
 #include <linux/fs.h>
+#include <linux/vfs.h>
 #include <linux/nfs.h>
 
 struct nfsd_fhandle {
kernel/acct.c +1 -0
@@ -50,6 +50,7 @@
 #include <linux/file.h>
 #include <linux/tty.h>
 #include <linux/security.h>
+#include <linux/vfs.h>
 #include <asm/uaccess.h>
 
 /*

===== mm/shmem.c 1.103 vs edited =====

mm/shmem.c +1 -1
@@ -32,7 +32,7 @@
 #include <linux/shmem_fs.h>
 #include <linux/mount.h>
 #include <linux/writeback.h>
-
+#include <linux/vfs.h>
 #include <asm/uaccess.h>
 
 /* This magic number is used in glibc for posix shared memory */