The patch titled BLOCK: Move extern declarations out of fs/*.c into header files has been added to the -mm tree. Its filename is block-move-extern-declarations-out-of-fs-c-into-header-files.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: BLOCK: Move extern declarations out of fs/*.c into header files From: David Howells <dhowells@xxxxxxxxxx> Create a new header file, fs/internal.h, for common definitions local to the sources in the fs/ directory. Move extern definitions that should be in header files from fs/*.c to fs/internal.h or other main header files where they span directories. Signed-off-by: David Howells <dhowells@xxxxxxxxxx> Cc: Jens Axboe <axboe@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- fs/binfmt_elf.c | 1 - fs/block_dev.c | 1 + fs/char_dev.c | 1 + fs/compat.c | 8 +------- fs/compat_ioctl.c | 2 -- fs/dcache.c | 4 +--- fs/fs-writeback.c | 3 +-- fs/internal.h | 36 ++++++++++++++++++++++++++++++++++++ fs/namespace.c | 3 +-- include/linux/compat.h | 1 + include/linux/ramfs.h | 1 + include/linux/sysfs.h | 3 ++- include/linux/tty.h | 3 +++ 13 files changed, 49 insertions(+), 18 deletions(-) diff -puN fs/binfmt_elf.c~block-move-extern-declarations-out-of-fs-c-into-header-files fs/binfmt_elf.c --- a/fs/binfmt_elf.c~block-move-extern-declarations-out-of-fs-c-into-header-files +++ a/fs/binfmt_elf.c @@ -46,7 +46,6 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs); static int load_elf_library(struct file *); static unsigned long elf_map (struct file *, unsigned long, struct elf_phdr *, int, int); -extern int dump_fpu (struct pt_regs *, elf_fpregset_t *); #ifndef elf_addr_t #define elf_addr_t unsigned long diff -puN fs/block_dev.c~block-move-extern-declarations-out-of-fs-c-into-header-files fs/block_dev.c --- a/fs/block_dev.c~block-move-extern-declarations-out-of-fs-c-into-header-files +++ a/fs/block_dev.c @@ -22,6 +22,7 @@ #include <linux/uio.h> #include <linux/namei.h> #include <asm/uaccess.h> +#include "internal.h" struct bdev_inode { struct block_device bdev; diff -puN fs/char_dev.c~block-move-extern-declarations-out-of-fs-c-into-header-files fs/char_dev.c --- a/fs/char_dev.c~block-move-extern-declarations-out-of-fs-c-into-header-files +++ a/fs/char_dev.c @@ -23,6 +23,7 @@ #ifdef CONFIG_KMOD #include <linux/kmod.h> #endif +#include "internal.h" static struct kobj_map *cdev_map; diff -puN fs/compat.c~block-move-extern-declarations-out-of-fs-c-into-header-files fs/compat.c --- a/fs/compat.c~block-move-extern-declarations-out-of-fs-c-into-header-files +++ a/fs/compat.c @@ -52,8 +52,7 @@ #include <asm/uaccess.h> #include <asm/mmu_context.h> #include <asm/ioctls.h> - -extern void sigset_from_compat(sigset_t *set, compat_sigset_t *compat); +#include "internal.h" int compat_log = 1; @@ -315,9 +314,6 @@ out: #define IOCTL_HASHSIZE 256 static struct ioctl_trans *ioctl32_hash_table[IOCTL_HASHSIZE]; -extern struct ioctl_trans ioctl_start[]; -extern int ioctl_table_size; - static inline unsigned long ioctl32_hash(unsigned long cmd) { return (((cmd >> 6) ^ (cmd >> 4) ^ cmd)) % IOCTL_HASHSIZE; @@ -840,8 +836,6 @@ static int do_nfs4_super_data_conv(void return 0; } -extern int copy_mount_options (const void __user *, unsigned long *); - #define SMBFS_NAME "smbfs" #define NCPFS_NAME "ncpfs" #define NFS4_NAME "nfs4" diff -puN fs/compat_ioctl.c~block-move-extern-declarations-out-of-fs-c-into-header-files fs/compat_ioctl.c --- a/fs/compat_ioctl.c~block-move-extern-declarations-out-of-fs-c-into-header-files +++ a/fs/compat_ioctl.c @@ -1279,8 +1279,6 @@ static int loop_status(unsigned int fd, return err; } -extern int tty_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigned long arg); - #ifdef CONFIG_VT static int vt_check(struct file *file) diff -puN fs/dcache.c~block-move-extern-declarations-out-of-fs-c-into-header-files fs/dcache.c --- a/fs/dcache.c~block-move-extern-declarations-out-of-fs-c-into-header-files +++ a/fs/dcache.c @@ -32,6 +32,7 @@ #include <linux/seqlock.h> #include <linux/swap.h> #include <linux/bootmem.h> +#include "internal.h" int sysctl_vfs_cache_pressure __read_mostly = 100; @@ -2007,9 +2008,6 @@ kmem_cache_t *filp_cachep __read_mostly; EXPORT_SYMBOL(d_genocide); -extern void bdev_cache_init(void); -extern void chrdev_init(void); - void __init vfs_caches_init_early(void) { dcache_init_early(); diff -puN fs/fs-writeback.c~block-move-extern-declarations-out-of-fs-c-into-header-files fs/fs-writeback.c --- a/fs/fs-writeback.c~block-move-extern-declarations-out-of-fs-c-into-header-files +++ a/fs/fs-writeback.c @@ -22,8 +22,7 @@ #include <linux/blkdev.h> #include <linux/backing-dev.h> #include <linux/buffer_head.h> - -extern struct super_block *blockdev_superblock; +#include "internal.h" /** * __mark_inode_dirty - internal function diff -puN /dev/null fs/internal.h --- /dev/null +++ a/fs/internal.h @@ -0,0 +1,36 @@ +/* fs/ internal definitions + * + * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. + * Written by David Howells (dhowells@xxxxxxxxxx) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#include <linux/ioctl32.h> + +/* + * block_dev.c + */ +extern struct super_block *blockdev_superblock; +extern void __init bdev_cache_init(void); + +/* + * char_dev.c + */ +extern void __init chrdev_init(void); + +/* + * compat_ioctl.c + */ +#ifdef CONFIG_COMPAT +extern struct ioctl_trans ioctl_start[]; +extern int ioctl_table_size; +#endif + +/* + * namespace.c + */ +extern int copy_mount_options(const void __user *, unsigned long *); diff -puN fs/namespace.c~block-move-extern-declarations-out-of-fs-c-into-header-files fs/namespace.c --- a/fs/namespace.c~block-move-extern-declarations-out-of-fs-c-into-header-files +++ a/fs/namespace.c @@ -19,6 +19,7 @@ #include <linux/capability.h> #include <linux/module.h> #include <linux/sysfs.h> +#include <linux/ramfs.h> #include <linux/seq_file.h> #include <linux/namespace.h> #include <linux/namei.h> @@ -28,8 +29,6 @@ #include <asm/unistd.h> #include "pnode.h" -extern int __init init_rootfs(void); - /* spinlock for vfsmount related operations, inplace of dcache_lock */ __cacheline_aligned_in_smp DEFINE_SPINLOCK(vfsmount_lock); diff -puN include/linux/compat.h~block-move-extern-declarations-out-of-fs-c-into-header-files include/linux/compat.h --- a/include/linux/compat.h~block-move-extern-declarations-out-of-fs-c-into-header-files +++ a/include/linux/compat.h @@ -227,6 +227,7 @@ static inline int compat_timespec_compar asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp); extern int compat_printk(const char *fmt, ...); +extern void sigset_from_compat(sigset_t *set, compat_sigset_t *compat); #endif /* CONFIG_COMPAT */ #endif /* _LINUX_COMPAT_H */ diff -puN include/linux/ramfs.h~block-move-extern-declarations-out-of-fs-c-into-header-files include/linux/ramfs.h --- a/include/linux/ramfs.h~block-move-extern-declarations-out-of-fs-c-into-header-files +++ a/include/linux/ramfs.h @@ -17,5 +17,6 @@ extern int ramfs_nommu_mmap(struct file extern const struct file_operations ramfs_file_operations; extern struct vm_operations_struct generic_file_vm_ops; +extern int __init init_rootfs(void); #endif diff -puN include/linux/sysfs.h~block-move-extern-declarations-out-of-fs-c-into-header-files include/linux/sysfs.h --- a/include/linux/sysfs.h~block-move-extern-declarations-out-of-fs-c-into-header-files +++ a/include/linux/sysfs.h @@ -11,6 +11,7 @@ #define _SYSFS_H_ #include <linux/compiler.h> +#include <linux/init.h> #include <asm/atomic.h> struct kobject; @@ -124,7 +125,7 @@ void sysfs_remove_group(struct kobject * void sysfs_notify(struct kobject * k, char *dir, char *attr); void sysfs_printk_last_file(void); -extern int __must_check sysfs_init(void); +extern int __must_check __init sysfs_init(void); #else /* CONFIG_SYSFS */ diff -puN include/linux/tty.h~block-move-extern-declarations-out-of-fs-c-into-header-files include/linux/tty.h --- a/include/linux/tty.h~block-move-extern-declarations-out-of-fs-c-into-header-files +++ a/include/linux/tty.h @@ -307,6 +307,9 @@ extern void tty_ldisc_put(int); extern void tty_wakeup(struct tty_struct *tty); extern void tty_ldisc_flush(struct tty_struct *tty); +extern int tty_ioctl(struct inode *inode, struct file *file, unsigned int cmd, + unsigned long arg); + extern struct mutex tty_mutex; /* n_tty.c */ _ Patches currently in -mm which might be from dhowells@xxxxxxxxxx are git-gfs2.patch git-nfs.patch nfs-replace-null-dentries-that-appear-in-readdirs-list-2.patch binfmt_elf-consistently-use-loff_t.patch afs-add-lock-annotations-to-afs_proc_cell_servers_startstop.patch elf_fdpic_core_dump-dont-take-tasklist_lock.patch simplify-update_times-avoid-jiffies-jiffies_64-aliasing-problem-2.patch lib-rwsemc-un-inline-rwsem_down_failed_common.patch reiserfs-make-sure-all-dentries-refs-are-released-before-calling-kill_block_super-try-2.patch fs-cache-provide-a-filesystem-specific-syncable-page-bit.patch fs-cache-generic-filesystem-caching-facility.patch fs-cache-release-page-private-in-failed-readahead.patch fs-cache-release-page-private-after-failed-readahead-12.patch fs-cache-make-kafs-use-fs-cache.patch fs-cache-make-kafs-use-fs-cache-fix.patch fs-cache-make-kafs-use-fs-cache-12.patch fs-cache-make-kafs-use-fs-cache-12-fix.patch fs-cache-make-kafs-use-fs-cache-vs-streamline-generic_file_-interfaces-and-filemap.patch nfs-use-local-caching.patch nfs-use-local-caching-12.patch nfs-use-local-caching-12-fix.patch fs-cache-cachefiles-ia64-missing-copy_page-export.patch fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem.patch fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem-cachefiles-printk-format-warning.patch fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem-warning-fixes.patch autofs-make-sure-all-dentries-refs-are-released-before-calling-kill_anon_super.patch vfs-destroy-the-dentries-contributed-by-a-superblock-on-unmounting.patch vfs-make-filldir_t-and-struct-kstat-deal-in-64-bit-inode-numbers.patch vfs-make-filldir_t-and-struct-kstat-deal-in-64-bit-inode-numbers-alpha-fix.patch nfs-represent-64-bit-fileids-as-64-bit-inode-numbers-on-32-bit-systems.patch ecryptfs-get_sb_dev-fix.patch block-move-functions-out-of-buffer-code.patch block-remove-duplicate-declaration-of-exit_io_context.patch block-stop-fallback_migrate_page-from-using-page_has_buffers.patch block-separate-the-bounce-buffering-code-from-the-highmem-code.patch block-dont-call-block_sync_page-from-afs.patch block-move-extern-declarations-out-of-fs-c-into-header-files.patch block-move-extern-declarations-out-of-fs-c-into-header-files-tidy.patch block-remove-dependence-on-existence-of-blockdev_superblock.patch block-remove-dependence-on-existence-of-blockdev_superblock-tidy.patch block-dissociate-generic_writepages-from-mpage-stuff.patch block-move-__invalidate_device-to-block_devc.patch block-move-the-loop-device-ioctl-compat-stuff-to-the-loop-driver.patch block-move-common-fs-specific-ioctls-to-linux-fsh.patch block-move-the-reiserfs-device-ioctl-compat-stuff-to-the-reiserfs-driver.patch block-move-the-ext2-device-ioctl-compat-stuff-to-the-ext2-driver.patch block-move-the-ext3-device-ioctl-compat-stuff-to-the-ext3-driver.patch block-move-the-msdos-device-ioctl-compat-stuff-to-the-msdos-driver.patch block-remove-no-longer-necessary-linux-mpageh-inclusions.patch block-remove-no-longer-necessary-linux-buffer_headh-inclusions.patch block-make-usb-storage-depend-on-scsi-rather-than-selecting-it.patch block-make-it-possible-to-disable-the-block-layer.patch block-make-it-possible-to-disable-the-block-layer-tidy.patch block-make-it-possible-to-disable-the-block-layer-tidy-fix.patch reiser4-get_sb_dev-fix.patch mutex-subsystem-synchro-test-module.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html