diff options
-rw-r--r-- | fs/fat/fat.h | 3 | ||||
-rw-r--r-- | fs/fat/inode.c | 4 | ||||
-rw-r--r-- | fs/fat/namei_msdos.c | 4 | ||||
-rw-r--r-- | fs/fat/namei_vfat.c | 4 |
4 files changed, 6 insertions, 9 deletions
diff --git a/fs/fat/fat.h b/fs/fat/fat.h index f50408901f7e..dc163b8d7699 100644 --- a/fs/fat/fat.h +++ b/fs/fat/fat.h | |||
@@ -319,8 +319,7 @@ extern struct inode *fat_build_inode(struct super_block *sb, | |||
319 | struct msdos_dir_entry *de, loff_t i_pos); | 319 | struct msdos_dir_entry *de, loff_t i_pos); |
320 | extern int fat_sync_inode(struct inode *inode); | 320 | extern int fat_sync_inode(struct inode *inode); |
321 | extern int fat_fill_super(struct super_block *sb, void *data, int silent, | 321 | extern int fat_fill_super(struct super_block *sb, void *data, int silent, |
322 | const struct inode_operations *fs_dir_inode_ops, | 322 | int isvfat, void (*setup)(struct super_block *)); |
323 | int isvfat, void (*setup)(struct super_block *)); | ||
324 | 323 | ||
325 | extern int fat_flush_inodes(struct super_block *sb, struct inode *i1, | 324 | extern int fat_flush_inodes(struct super_block *sb, struct inode *i1, |
326 | struct inode *i2); | 325 | struct inode *i2); |
diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 8d68690bdcf1..c27704dc485e 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c | |||
@@ -1238,8 +1238,7 @@ static int fat_read_root(struct inode *inode) | |||
1238 | /* | 1238 | /* |
1239 | * Read the super block of an MS-DOS FS. | 1239 | * Read the super block of an MS-DOS FS. |
1240 | */ | 1240 | */ |
1241 | int fat_fill_super(struct super_block *sb, void *data, int silent, | 1241 | int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, |
1242 | const struct inode_operations *fs_dir_inode_ops, int isvfat, | ||
1243 | void (*setup)(struct super_block *)) | 1242 | void (*setup)(struct super_block *)) |
1244 | { | 1243 | { |
1245 | struct inode *root_inode = NULL, *fat_inode = NULL; | 1244 | struct inode *root_inode = NULL, *fat_inode = NULL; |
@@ -1268,7 +1267,6 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, | |||
1268 | sb->s_magic = MSDOS_SUPER_MAGIC; | 1267 | sb->s_magic = MSDOS_SUPER_MAGIC; |
1269 | sb->s_op = &fat_sops; | 1268 | sb->s_op = &fat_sops; |
1270 | sb->s_export_op = &fat_export_ops; | 1269 | sb->s_export_op = &fat_export_ops; |
1271 | sbi->dir_ops = fs_dir_inode_ops; | ||
1272 | ratelimit_state_init(&sbi->ratelimit, DEFAULT_RATELIMIT_INTERVAL, | 1270 | ratelimit_state_init(&sbi->ratelimit, DEFAULT_RATELIMIT_INTERVAL, |
1273 | DEFAULT_RATELIMIT_BURST); | 1271 | DEFAULT_RATELIMIT_BURST); |
1274 | 1272 | ||
diff --git a/fs/fat/namei_msdos.c b/fs/fat/namei_msdos.c index 711499040eb6..3b222dafd15b 100644 --- a/fs/fat/namei_msdos.c +++ b/fs/fat/namei_msdos.c | |||
@@ -659,14 +659,14 @@ static const struct inode_operations msdos_dir_inode_operations = { | |||
659 | 659 | ||
660 | static void setup(struct super_block *sb) | 660 | static void setup(struct super_block *sb) |
661 | { | 661 | { |
662 | MSDOS_SB(sb)->dir_ops = &msdos_dir_inode_operations; | ||
662 | sb->s_d_op = &msdos_dentry_operations; | 663 | sb->s_d_op = &msdos_dentry_operations; |
663 | sb->s_flags |= MS_NOATIME; | 664 | sb->s_flags |= MS_NOATIME; |
664 | } | 665 | } |
665 | 666 | ||
666 | static int msdos_fill_super(struct super_block *sb, void *data, int silent) | 667 | static int msdos_fill_super(struct super_block *sb, void *data, int silent) |
667 | { | 668 | { |
668 | return fat_fill_super(sb, data, silent, &msdos_dir_inode_operations, | 669 | return fat_fill_super(sb, data, silent, 0, setup); |
669 | 0, setup); | ||
670 | } | 670 | } |
671 | 671 | ||
672 | static struct dentry *msdos_mount(struct file_system_type *fs_type, | 672 | static struct dentry *msdos_mount(struct file_system_type *fs_type, |
diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c index adae3fb7451a..20b4ea53fdc4 100644 --- a/fs/fat/namei_vfat.c +++ b/fs/fat/namei_vfat.c | |||
@@ -1065,6 +1065,7 @@ static const struct inode_operations vfat_dir_inode_operations = { | |||
1065 | 1065 | ||
1066 | static void setup(struct super_block *sb) | 1066 | static void setup(struct super_block *sb) |
1067 | { | 1067 | { |
1068 | MSDOS_SB(sb)->dir_ops = &vfat_dir_inode_operations; | ||
1068 | if (MSDOS_SB(sb)->options.name_check != 's') | 1069 | if (MSDOS_SB(sb)->options.name_check != 's') |
1069 | sb->s_d_op = &vfat_ci_dentry_ops; | 1070 | sb->s_d_op = &vfat_ci_dentry_ops; |
1070 | else | 1071 | else |
@@ -1073,8 +1074,7 @@ static void setup(struct super_block *sb) | |||
1073 | 1074 | ||
1074 | static int vfat_fill_super(struct super_block *sb, void *data, int silent) | 1075 | static int vfat_fill_super(struct super_block *sb, void *data, int silent) |
1075 | { | 1076 | { |
1076 | return fat_fill_super(sb, data, silent, &vfat_dir_inode_operations, | 1077 | return fat_fill_super(sb, data, silent, 1, setup); |
1077 | 1, setup); | ||
1078 | } | 1078 | } |
1079 | 1079 | ||
1080 | static struct dentry *vfat_mount(struct file_system_type *fs_type, | 1080 | static struct dentry *vfat_mount(struct file_system_type *fs_type, |