ext2/3/4: delete unneeded includes of module.h
Subsystems (2)
PATCH 1/1 ext2/3/4: delete unneeded includes of module.h
Delete any instances of include module.h that were not strictly required. In the case of ext2, the declaration of MODULE_LICENSE etc. were in inode.c but the module_init/exit were in super.c, so relocate the MODULE_LICENCE/AUTHOR block to super.c which makes it consistent with ext3 and ext4 at the same time.
fs/ext2/inode.c +0 -5
@@ -26,7 +26,6 @@#include <linux/highuid.h> #include <linux/pagemap.h> #include <linux/quotaops.h> -#include <linux/module.h> #include <linux/writeback.h> #include <linux/buffer_head.h> #include <linux/mpage.h>
@@ -36,10 +35,6 @@#include "acl.h" #include "xip.h" -MODULE_AUTHOR ("Remy Card and others" ); -MODULE_DESCRIPTION ("Second Extended Filesystem" ); -MODULE_LICENSE ("GPL" ); -static int __ext2_write_inode (struct inode *inode,int do_sync);/*
fs/ext2/super.c +3 -0
@@ -1521,5 +1521,8 @@ static void __exit exit_ext2_fs(void)exit_ext2_xattr (); } +MODULE_AUTHOR ("Remy Card and others" ); +MODULE_DESCRIPTION ("Second Extended Filesystem" ); +MODULE_LICENSE ("GPL" );module_init (init_ext2_fs)module_exit (exit_ext2_fs)
fs/ext2/xattr.c +0 -1
@@ -54,7 +54,6 @@*/ #include <linux/buffer_head.h> -#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> #include <linux/mbcache.h>
fs/ext2/xattr_security.c +0 -1
@@ -3,7 +3,6 @@* Handler for storing security labels as extended attributes. */ -#include <linux/module.h> #include <linux/slab.h> #include <linux/string.h> #include <linux/fs.h>
fs/ext2/xattr_trusted.c +0 -1
@@ -5,7 +5,6 @@* Copyright (C) 2003 by Andreas Gruenbacher, <[email protected]> */ -#include <linux/module.h> #include <linux/string.h> #include <linux/capability.h> #include <linux/fs.h>
fs/ext2/xattr_user.c +0 -1
@@ -6,7 +6,6 @@*/ #include <linux/init.h> -#include <linux/module.h> #include <linux/string.h> #include "ext2.h" #include "xattr.h"
fs/ext3/inode.c +0 -1
@@ -22,7 +22,6 @@* Assorted race fixes, rewrite of ext3_get_block() by Al Viro, 2000 */ -#include <linux/module.h> #include <linux/fs.h> #include <linux/time.h> #include <linux/ext3_jbd.h>
fs/ext3/xattr_security.c +0 -1
@@ -3,7 +3,6 @@* Handler for storing security labels as extended attributes. */ -#include <linux/module.h> #include <linux/slab.h> #include <linux/string.h> #include <linux/fs.h>
fs/ext3/xattr_trusted.c +0 -1
@@ -5,7 +5,6 @@* Copyright (C) 2003 by Andreas Gruenbacher, <[email protected]> */ -#include <linux/module.h> #include <linux/string.h> #include <linux/capability.h> #include <linux/fs.h>
fs/ext3/xattr_user.c +0 -1
@@ -5,7 +5,6 @@* Copyright (C) 2001 by Andreas Gruenbacher, <[email protected]> */ -#include <linux/module.h> #include <linux/string.h> #include <linux/fs.h> #include <linux/ext3_jbd.h>
fs/ext4/block_validity.c +0 -1
@@ -13,7 +13,6 @@#include <linux/namei.h> #include <linux/quotaops.h> #include <linux/buffer_head.h> -#include <linux/module.h> #include <linux/swap.h> #include <linux/pagemap.h> #include <linux/blkdev.h>
fs/ext4/extents.c +0 -1
@@ -29,7 +29,6 @@* - smart tree reduction */ -#include <linux/module.h> #include <linux/fs.h> #include <linux/time.h> #include <linux/jbd2.h>
fs/ext4/indirect.c +0 -1
@@ -20,7 +20,6 @@* ([email protected]), 1993, 1998 */ -#include <linux/module.h> #include "ext4_jbd2.h" #include "truncate.h"
fs/ext4/inode.c +0 -1
@@ -18,7 +18,6 @@* Assorted race fixes, rewrite of ext4_get_block() by Al Viro, 2000 */ -#include <linux/module.h> #include <linux/fs.h> #include <linux/time.h> #include <linux/jbd2.h>
fs/ext4/migrate.c +0 -1
@@ -12,7 +12,6 @@* */ -#include <linux/module.h> #include <linux/slab.h> #include "ext4_jbd2.h"
fs/ext4/page-io.c +0 -1
@@ -6,7 +6,6 @@* Written by Theodore Ts'o, 2010. */ -#include <linux/module.h> #include <linux/fs.h> #include <linux/time.h> #include <linux/jbd2.h>
fs/ext4/xattr_security.c +0 -1
@@ -3,7 +3,6 @@* Handler for storing security labels as extended attributes. */ -#include <linux/module.h> #include <linux/string.h> #include <linux/fs.h> #include <linux/security.h>
fs/ext4/xattr_trusted.c +0 -1
@@ -5,7 +5,6 @@* Copyright (C) 2003 by Andreas Gruenbacher, <[email protected]> */ -#include <linux/module.h> #include <linux/string.h> #include <linux/capability.h> #include <linux/fs.h>
fs/ext4/xattr_user.c +0 -1
@@ -5,7 +5,6 @@* Copyright (C) 2001 by Andreas Gruenbacher, <[email protected]> */ -#include <linux/module.h> #include <linux/string.h> #include <linux/fs.h> #include "ext4_jbd2.h"
Signature · 1 line
1.7.7
Jan Kara
reviewerQuoted 5 lines · Paul Gortmaker
Delete any instances of include
module.hthat were not strictly required. In the case of ext2, the declaration ofMODULE_LICENSEetc. were ininode.cbut the module_init/exit were insuper.c, so relocate the MODULE_LICENCE/AUTHOR block tosuper.cwhich makes it consistent with ext3 and ext4 at the same time.
Thanks. I've taken the patch into my tree. But please separate ext2,
ext3, and ext4 changes next time since ext4 is maintained in a different tree so ideally a different person would carry that part of the patch.
Honza
Quoted 245 lines
Signed-off-by Paul Gortmaker <[email protected]>fs/ext2/inode.c +0
-5@@ -26,7 +26,6 @@#include <linux/highuid.h> #include <linux/pagemap.h> #include <linux/quotaops.h> -#include <linux/module.h> #include <linux/writeback.h> #include <linux/buffer_head.h> #include <linux/mpage.h> @@ -36,10 +35,6 @@#include "acl.h" #include "xip.h" -MODULE_AUTHOR ("Remy Card and others" ); -MODULE_DESCRIPTION ("Second Extended Filesystem" ); -MODULE_LICENSE ("GPL" ); -static int __ext2_write_inode (struct inode *inode,int do_sync);/* fs/ext2/super.c +3
-0@@ -1521,5 +1521,8 @@ static void __exit exit_ext2_fs(void)exit_ext2_xattr (); } +MODULE_AUTHOR ("Remy Card and others" ); +MODULE_DESCRIPTION ("Second Extended Filesystem" ); +MODULE_LICENSE ("GPL" );module_init (init_ext2_fs)module_exit (exit_ext2_fs)fs/ext2/xattr.c +0
-1@@ -54,7 +54,6 @@*/ #include <linux/buffer_head.h> -#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> #include <linux/mbcache.h> fs/ext2/xattr_security.c +0
-1@@ -3,7 +3,6 @@* Handler for storing security labels as extended attributes. */ -#include <linux/module.h> #include <linux/slab.h> #include <linux/string.h> #include <linux/fs.h> fs/ext2/xattr_trusted.c +0
-1@@ -5,7 +5,6 @@* Copyright (C) 2003 by Andreas Gruenbacher, <[email protected]> */ -#include <linux/module.h> #include <linux/string.h> #include <linux/capability.h> #include <linux/fs.h> fs/ext2/xattr_user.c +0
-1@@ -6,7 +6,6 @@*/ #include <linux/init.h> -#include <linux/module.h> #include <linux/string.h> #include "ext2.h" #include "xattr.h" fs/ext3/inode.c +0
-1@@ -22,7 +22,6 @@* Assorted race fixes, rewrite of ext3_get_block() by Al Viro, 2000 */ -#include <linux/module.h> #include <linux/fs.h> #include <linux/time.h> #include <linux/ext3_jbd.h> fs/ext3/xattr_security.c +0
-1@@ -3,7 +3,6 @@* Handler for storing security labels as extended attributes. */ -#include <linux/module.h> #include <linux/slab.h> #include <linux/string.h> #include <linux/fs.h> fs/ext3/xattr_trusted.c +0
-1@@ -5,7 +5,6 @@* Copyright (C) 2003 by Andreas Gruenbacher, <[email protected]> */ -#include <linux/module.h> #include <linux/string.h> #include <linux/capability.h> #include <linux/fs.h> fs/ext3/xattr_user.c +0
-1@@ -5,7 +5,6 @@* Copyright (C) 2001 by Andreas Gruenbacher, <[email protected]> */ -#include <linux/module.h> #include <linux/string.h> #include <linux/fs.h> #include <linux/ext3_jbd.h> fs/ext4/block_validity.c +0
-1@@ -13,7 +13,6 @@#include <linux/namei.h> #include <linux/quotaops.h> #include <linux/buffer_head.h> -#include <linux/module.h> #include <linux/swap.h> #include <linux/pagemap.h> #include <linux/blkdev.h> fs/ext4/extents.c +0
-1@@ -29,7 +29,6 @@* - smart tree reduction */ -#include <linux/module.h> #include <linux/fs.h> #include <linux/time.h> #include <linux/jbd2.h> fs/ext4/indirect.c +0
-1@@ -20,7 +20,6 @@* ([email protected]), 1993, 1998 */ -#include <linux/module.h> #include "ext4_jbd2.h" #include "truncate.h" fs/ext4/inode.c +0
-1@@ -18,7 +18,6 @@* Assorted race fixes, rewrite of ext4_get_block() by Al Viro, 2000 */ -#include <linux/module.h> #include <linux/fs.h> #include <linux/time.h> #include <linux/jbd2.h> fs/ext4/migrate.c +0
-1@@ -12,7 +12,6 @@* */ -#include <linux/module.h> #include <linux/slab.h> #include "ext4_jbd2.h" fs/ext4/page-io.c +0
-1@@ -6,7 +6,6 @@* Written by Theodore Ts'o, 2010. */ -#include <linux/module.h> #include <linux/fs.h> #include <linux/time.h> #include <linux/jbd2.h> fs/ext4/xattr_security.c +0
-1@@ -3,7 +3,6 @@* Handler for storing security labels as extended attributes. */ -#include <linux/module.h> #include <linux/string.h> #include <linux/fs.h> #include <linux/security.h> fs/ext4/xattr_trusted.c +0
-1@@ -5,7 +5,6 @@* Copyright (C) 2003 by Andreas Gruenbacher, <[email protected]> */ -#include <linux/module.h> #include <linux/string.h> #include <linux/capability.h> #include <linux/fs.h> fs/ext4/xattr_user.c +0
-1@@ -5,7 +5,6 @@* Copyright (C) 2001 by Andreas Gruenbacher, <[email protected]> */ -#include <linux/module.h> #include <linux/string.h> #include <linux/fs.h> #include "ext4_jbd2.h" Signature · 1 line
1.7.7
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR