fat: use new setup() for ->dir_ops too
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Tue, 12 Apr 2011 12:08:37 +0000 (21:08 +0900)
committerOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Tue, 12 Apr 2011 12:12:00 +0000 (21:12 +0900)
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
fs/fat/fat.h
fs/fat/inode.c
fs/fat/namei_msdos.c
fs/fat/namei_vfat.c

index f50408901f7ea55eb3c2dfa54ae936051ad9c5fc..dc163b8d7699406ebbef5d97a8eb9fb5a58961e3 100644 (file)
@@ -319,8 +319,7 @@ extern struct inode *fat_build_inode(struct super_block *sb,
                        struct msdos_dir_entry *de, loff_t i_pos);
 extern int fat_sync_inode(struct inode *inode);
 extern int fat_fill_super(struct super_block *sb, void *data, int silent,
-                       const struct inode_operations *fs_dir_inode_ops,
-                       int isvfat, void (*setup)(struct super_block *));
+                         int isvfat, void (*setup)(struct super_block *));
 
 extern int fat_flush_inodes(struct super_block *sb, struct inode *i1,
                            struct inode *i2);
index 8d68690bdcf1b2f26bb318972218930daa9676a6..c27704dc485e2bcf7736abcbdba5fe773ab2e3d5 100644 (file)
@@ -1238,8 +1238,7 @@ static int fat_read_root(struct inode *inode)
 /*
  * Read the super block of an MS-DOS FS.
  */
-int fat_fill_super(struct super_block *sb, void *data, int silent,
-                  const struct inode_operations *fs_dir_inode_ops, int isvfat,
+int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
                   void (*setup)(struct super_block *))
 {
        struct inode *root_inode = NULL, *fat_inode = NULL;
@@ -1268,7 +1267,6 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
        sb->s_magic = MSDOS_SUPER_MAGIC;
        sb->s_op = &fat_sops;
        sb->s_export_op = &fat_export_ops;
-       sbi->dir_ops = fs_dir_inode_ops;
        ratelimit_state_init(&sbi->ratelimit, DEFAULT_RATELIMIT_INTERVAL,
                             DEFAULT_RATELIMIT_BURST);
 
index 711499040eb615ebe66a263f3d99661e9698e0b5..3b222dafd15b7eb6fa8f8b425a407f8a70dc7a19 100644 (file)
@@ -659,14 +659,14 @@ static const struct inode_operations msdos_dir_inode_operations = {
 
 static void setup(struct super_block *sb)
 {
+       MSDOS_SB(sb)->dir_ops = &msdos_dir_inode_operations;
        sb->s_d_op = &msdos_dentry_operations;
        sb->s_flags |= MS_NOATIME;
 }
 
 static int msdos_fill_super(struct super_block *sb, void *data, int silent)
 {
-       return fat_fill_super(sb, data, silent, &msdos_dir_inode_operations,
-                            0, setup);
+       return fat_fill_super(sb, data, silent, 0, setup);
 }
 
 static struct dentry *msdos_mount(struct file_system_type *fs_type,
index adae3fb7451aa52670d07fdf34381defe133e73a..20b4ea53fdc4e3be434dc7601dce74a3a4658473 100644 (file)
@@ -1065,6 +1065,7 @@ static const struct inode_operations vfat_dir_inode_operations = {
 
 static void setup(struct super_block *sb)
 {
+       MSDOS_SB(sb)->dir_ops = &vfat_dir_inode_operations;
        if (MSDOS_SB(sb)->options.name_check != 's')
                sb->s_d_op = &vfat_ci_dentry_ops;
        else
@@ -1073,8 +1074,7 @@ static void setup(struct super_block *sb)
 
 static int vfat_fill_super(struct super_block *sb, void *data, int silent)
 {
-       return fat_fill_super(sb, data, silent, &vfat_dir_inode_operations,
-                            1, setup);
+       return fat_fill_super(sb, data, silent, 1, setup);
 }
 
 static struct dentry *vfat_mount(struct file_system_type *fs_type,