From a40a7d9d07b818ce9aa9f6ddf86076a5eef2d8f9 Mon Sep 17 00:00:00 2001 From: Alexander Kuleshov Date: Thu, 16 Apr 2015 12:47:21 -0700 Subject: fs/fat: remove unnecessary defintion '*sb' never used, so let's remote it and pass inode->i_sb directly to the MSDOS_SB. Signed-off-by: Alexander Kuleshov Acked-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/fat/inode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fs/fat') diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 8521207de229..b3a2a0e1ef9b 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -1279,8 +1279,7 @@ out: static int fat_read_root(struct inode *inode) { - struct super_block *sb = inode->i_sb; - struct msdos_sb_info *sbi = MSDOS_SB(sb); + struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb); int error; MSDOS_I(inode)->i_pos = MSDOS_ROOT_INO; -- cgit v1.2.3 From 58932ef7f2f28e89ee37c6e2be94885e5078ba77 Mon Sep 17 00:00:00 2001 From: Alexander Kuleshov Date: Thu, 16 Apr 2015 12:47:24 -0700 Subject: fs/fat: remove unnecessary includes 'fat.h' includes which includes which includes all the header files required for all *.c files fat filesystem. [akpm@linux-foundation.org: fs/fat/iode.c needs seq_file.h] [sfr@canb.auug.org.au: put one actually necessary include file back] Signed-off-by: Alexander Kuleshov Acked-by: OGAWA Hirofumi Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/fat/cache.c | 2 -- fs/fat/dir.c | 4 ---- fs/fat/fat.h | 3 --- fs/fat/fatent.c | 3 --- fs/fat/file.c | 4 ---- fs/fat/inode.c | 10 +--------- fs/fat/misc.c | 4 ---- fs/fat/namei_msdos.c | 2 -- fs/fat/namei_vfat.c | 2 -- 9 files changed, 1 insertion(+), 33 deletions(-) (limited to 'fs/fat') diff --git a/fs/fat/cache.c b/fs/fat/cache.c index 91ad9e1c9441..93fc62232ec2 100644 --- a/fs/fat/cache.c +++ b/fs/fat/cache.c @@ -8,9 +8,7 @@ * May 1999. AV. Fixed the bogosity with FAT32 (read "FAT28"). Fscking lusers. */ -#include #include -#include #include "fat.h" /* this must be > 0. */ diff --git a/fs/fat/dir.c b/fs/fat/dir.c index c5d6bb939d19..4afc4d9d2e41 100644 --- a/fs/fat/dir.c +++ b/fs/fat/dir.c @@ -13,13 +13,9 @@ * Short name translation 1999, 2001 by Wolfram Pienkoss */ -#include #include -#include -#include #include #include -#include #include "fat.h" /* diff --git a/fs/fat/fat.h b/fs/fat/fat.h index 64e295e8ff38..fe65a7d5688b 100644 --- a/fs/fat/fat.h +++ b/fs/fat/fat.h @@ -2,11 +2,8 @@ #define _FAT_H #include -#include #include -#include #include -#include #include #include diff --git a/fs/fat/fatent.c b/fs/fat/fatent.c index 260705c58062..8226557130a2 100644 --- a/fs/fat/fatent.c +++ b/fs/fat/fatent.c @@ -3,9 +3,6 @@ * Released under GPL v2. */ -#include -#include -#include #include #include "fat.h" diff --git a/fs/fat/file.c b/fs/fat/file.c index 1e98d333879f..cf50d93565a2 100644 --- a/fs/fat/file.c +++ b/fs/fat/file.c @@ -10,10 +10,6 @@ #include #include #include -#include -#include -#include -#include #include #include #include diff --git a/fs/fat/inode.c b/fs/fat/inode.c index b3a2a0e1ef9b..d1a26c2de919 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -11,20 +11,12 @@ */ #include -#include -#include -#include -#include #include #include -#include -#include #include +#include #include #include -#include -#include -#include #include #include #include "fat.h" diff --git a/fs/fat/misc.c b/fs/fat/misc.c index d8da2d2e30ae..c4589e981760 100644 --- a/fs/fat/misc.c +++ b/fs/fat/misc.c @@ -6,10 +6,6 @@ * and date_dos2unix for date==0 by Igor Zhbanov(bsg@uniyar.ac.ru) */ -#include -#include -#include -#include #include "fat.h" /* diff --git a/fs/fat/namei_msdos.c b/fs/fat/namei_msdos.c index a783b0e1272a..cc6a8541b668 100644 --- a/fs/fat/namei_msdos.c +++ b/fs/fat/namei_msdos.c @@ -7,8 +7,6 @@ */ #include -#include -#include #include "fat.h" /* Characters that are undesirable in an MS-DOS file name */ diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c index b8b92c2f9683..7e0974eebd8e 100644 --- a/fs/fat/namei_vfat.c +++ b/fs/fat/namei_vfat.c @@ -16,10 +16,8 @@ */ #include -#include #include #include -#include #include #include "fat.h" -- cgit v1.2.3 From 8de560def7426a770ce8f967b3c3534bc9a2f683 Mon Sep 17 00:00:00 2001 From: Alexander Kuleshov Date: Thu, 16 Apr 2015 12:47:26 -0700 Subject: fs/fat: comment fix, fat_bits can be also 32 Signed-off-by: Alexander Kuleshov Acked-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/fat/fat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/fat') diff --git a/fs/fat/fat.h b/fs/fat/fat.h index fe65a7d5688b..be5e15323bab 100644 --- a/fs/fat/fat.h +++ b/fs/fat/fat.h @@ -63,7 +63,7 @@ struct msdos_sb_info { unsigned short sec_per_clus; /* sectors/cluster */ unsigned short cluster_bits; /* log2(cluster_size) */ unsigned int cluster_size; /* cluster size */ - unsigned char fats, fat_bits; /* number of FATs, FAT bits (12 or 16) */ + unsigned char fats, fat_bits; /* number of FATs, FAT bits (12,16 or 32) */ unsigned short fat_start; unsigned long fat_length; /* FAT start & length (sec.) */ unsigned long dir_start; -- cgit v1.2.3