Skip to content

Commit

Permalink
fs: reduce the use of module.h wherever possible
Browse files Browse the repository at this point in the history
For files only using THIS_MODULE and/or EXPORT_SYMBOL, map
them onto including export.h -- or if the file isn't even
using those, then just delete the include.  Fix up any implicit
include dependencies that were being masked by module.h along
the way.

Signed-off-by: Paul Gortmaker <[email protected]>
  • Loading branch information
Paul Gortmaker committed Feb 29, 2012
1 parent 13ae246 commit 630d9c4
Show file tree
Hide file tree
Showing 32 changed files with 30 additions and 32 deletions.
2 changes: 1 addition & 1 deletion fs/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <linux/errno.h>
#include <linux/time.h>
#include <linux/aio_abi.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/syscalls.h>
#include <linux/backing-dev.h>
#include <linux/uio.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* changes by Thomas Schoebel-Theuer
*/

#include <linux/module.h>
#include <linux/export.h>
#include <linux/time.h>
#include <linux/mm.h>
#include <linux/string.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/bad_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

#include <linux/fs.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/stat.h>
#include <linux/time.h>
#include <linux/namei.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/binfmt_flat.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* JAN/99 -- coded full program relocation ([email protected])
*/

#include <linux/module.h>
#include <linux/export.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/mm.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/mempool.h>
#include <linux/workqueue.h>
#include <scsi/sg.h> /* for struct sg_iovec */
Expand Down
2 changes: 1 addition & 1 deletion fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <linux/file.h>
#include <linux/quotaops.h>
#include <linux/highmem.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/writeback.h>
#include <linux/hash.h>
#include <linux/suspend.h>
Expand Down
1 change: 0 additions & 1 deletion fs/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <linux/nfs4_mount.h>
#include <linux/syscalls.h>
#include <linux/ctype.h>
#include <linux/module.h>
#include <linux/dirent.h>
#include <linux/fsnotify.h>
#include <linux/highuid.h>
Expand Down
1 change: 0 additions & 1 deletion fs/compat_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
#include <linux/elevator.h>
#include <linux/rtc.h>
#include <linux/pci.h>
#include <linux/module.h>
#include <linux/serial.h>
#include <linux/if_tun.h>
#include <linux/ctype.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <linux/init.h>
#include <linux/hash.h>
#include <linux/cache.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/mount.h>
#include <linux/file.h>
#include <asm/uaccess.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/dcookies.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/

#include <linux/syscalls.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/slab.h>
#include <linux/list.h>
#include <linux/mount.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/eventfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <linux/spinlock.h>
#include <linux/anon_inodes.h>
#include <linux/syscalls.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/kref.h>
#include <linux/eventfd.h>

Expand Down
2 changes: 1 addition & 1 deletion fs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Manage the dynamic fd arrays in the process files_struct.
*/

#include <linux/module.h>
#include <linux/export.h>
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/mmzone.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/fs-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <linux/sched.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/fs_struct.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <linux/module.h>
#include <linux/export.h>
#include <linux/sched.h>
#include <linux/fs.h>
#include <linux/path.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/writeback.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/backing-dev.h>
#include <linux/wait.h>
#include <linux/rwsem.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/security.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/uaccess.h>
#include <linux/writeback.h>
#include <linux/buffer_head.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/libfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Library for filesystems writers.
*/

#include <linux/module.h>
#include <linux/export.h>
#include <linux/pagemap.h>
#include <linux/slab.h>
#include <linux/mount.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/mpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/mm.h>
#include <linux/kdev_t.h>
#include <linux/gfp.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

#include <linux/init.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/slab.h>
#include <linux/fs.h>
#include <linux/namei.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/posix_acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <linux/fs.h>
#include <linux/sched.h>
#include <linux/posix_acl.h>
#include <linux/module.h>
#include <linux/export.h>

#include <linux/errno.h>

Expand Down
2 changes: 1 addition & 1 deletion fs/read_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <linux/uio.h>
#include <linux/fsnotify.h>
#include <linux/security.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/syscalls.h>
#include <linux/pagemap.h>
#include <linux/splice.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/readdir.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/time.h>
#include <linux/mm.h>
#include <linux/errno.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/select.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/syscalls.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/slab.h>
#include <linux/poll.h>
#include <linux/personality.h> /* for STICKY_TIMEOUTS */
Expand Down
2 changes: 1 addition & 1 deletion fs/seq_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

#include <linux/fs.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/seq_file.h>
#include <linux/slab.h>

Expand Down
2 changes: 1 addition & 1 deletion fs/splice.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <linux/mm_inline.h>
#include <linux/swap.h>
#include <linux/writeback.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/syscalls.h>
#include <linux/uio.h>
#include <linux/security.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/stack.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <linux/module.h>
#include <linux/export.h>
#include <linux/fs.h>
#include <linux/fs_stack.h>

Expand Down
2 changes: 1 addition & 1 deletion fs/stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Copyright (C) 1991, 1992 Linus Torvalds
*/

#include <linux/module.h>
#include <linux/export.h>
#include <linux/mm.h>
#include <linux/errno.h>
#include <linux/file.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/statfs.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <linux/syscalls.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/fs.h>
#include <linux/file.h>
#include <linux/mount.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Heavily rewritten for 'one fs - one tree' dcache architecture. AV, Mar 2000
*/

#include <linux/module.h>
#include <linux/export.h>
#include <linux/slab.h>
#include <linux/acct.h>
#include <linux/blkdev.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/namei.h>
#include <linux/sched.h>
#include <linux/writeback.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <linux/security.h>
#include <linux/evm.h>
#include <linux/syscalls.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/fsnotify.h>
#include <linux/audit.h>
#include <asm/uaccess.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/xattr_acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Copyright (C) 2001 by Andreas Gruenbacher, <[email protected]>
*/

#include <linux/module.h>
#include <linux/export.h>
#include <linux/fs.h>
#include <linux/posix_acl_xattr.h>
#include <linux/gfp.h>
Expand Down

0 comments on commit 630d9c4

Please sign in to comment.