Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 25 Mar 2010 21:10:53 +0000 (14:10 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 25 Mar 2010 21:10:53 +0000 (14:10 -0700)
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: Fixed inode allocator to correctly track a flex_bg's used_dirs
  ext4: Don't use delayed allocation by default when used instead of ext3
  ext4: Fix spelling of CONTIG_FS_EXT3 to CONFIG_FS_EXT3
  ext4: Fix estimate of # of blocks needed to write indirect-mapped files

1  2 
fs/ext4/super.c

diff --combined fs/ext4/super.c
index ba191dae87304e9106940dfe25e8af41573181ca,29c6875d9b4dc451d611f369ccd3acae4458a2ae..e14d22c170d542f3d65b7b50065f0256e0c940b3
@@@ -68,7 -68,21 +68,21 @@@ static int ext4_statfs(struct dentry *d
  static int ext4_unfreeze(struct super_block *sb);
  static void ext4_write_super(struct super_block *sb);
  static int ext4_freeze(struct super_block *sb);
+ static int ext4_get_sb(struct file_system_type *fs_type, int flags,
+                      const char *dev_name, void *data, struct vfsmount *mnt);
  
+ #if !defined(CONFIG_EXT3_FS) && !defined(CONFIG_EXT3_FS_MODULE) && defined(CONFIG_EXT4_USE_FOR_EXT23)
+ static struct file_system_type ext3_fs_type = {
+       .owner          = THIS_MODULE,
+       .name           = "ext3",
+       .get_sb         = ext4_get_sb,
+       .kill_sb        = kill_block_super,
+       .fs_flags       = FS_REQUIRES_DEV,
+ };
+ #define IS_EXT3_SB(sb) ((sb)->s_bdev->bd_holder == &ext3_fs_type)
+ #else
+ #define IS_EXT3_SB(sb) (0)
+ #endif
  
  ext4_fsblk_t ext4_block_bitmap(struct super_block *sb,
                               struct ext4_group_desc *bg)
@@@ -302,7 -316,7 +316,7 @@@ void ext4_journal_abort_handle(const ch
   * write out the superblock safely.
   *
   * We'll just use the jbd2_journal_abort() error code to record an error in
 - * the journal instead.  On recovery, the journal will compain about
 + * the journal instead.  On recovery, the journal will complain about
   * that error until we've noted it down and cleared it.
   */
  
@@@ -2539,7 -2553,8 +2553,8 @@@ static int ext4_fill_super(struct super
         * enable delayed allocation by default
         * Use -o nodelalloc to turn it off
         */
-       set_opt(sbi->s_mount_opt, DELALLOC);
+       if (!IS_EXT3_SB(sb))
+               set_opt(sbi->s_mount_opt, DELALLOC);
  
        if (!parse_options((char *) data, sb, &journal_devnum,
                           &journal_ioprio, NULL, 0))
@@@ -4068,7 -4083,7 +4083,7 @@@ static int ext4_get_sb(struct file_syst
        return get_sb_bdev(fs_type, flags, dev_name, data, ext4_fill_super,mnt);
  }
  
- #if !defined(CONTIG_EXT2_FS) && !defined(CONFIG_EXT2_FS_MODULE) && defined(CONFIG_EXT4_USE_FOR_EXT23)
+ #if !defined(CONFIG_EXT2_FS) && !defined(CONFIG_EXT2_FS_MODULE) && defined(CONFIG_EXT4_USE_FOR_EXT23)
  static struct file_system_type ext2_fs_type = {
        .owner          = THIS_MODULE,
        .name           = "ext2",
@@@ -4095,15 -4110,7 +4110,7 @@@ static inline void register_as_ext2(voi
  static inline void unregister_as_ext2(void) { }
  #endif
  
- #if !defined(CONTIG_EXT3_FS) && !defined(CONFIG_EXT3_FS_MODULE) && defined(CONFIG_EXT4_USE_FOR_EXT23)
- static struct file_system_type ext3_fs_type = {
-       .owner          = THIS_MODULE,
-       .name           = "ext3",
-       .get_sb         = ext4_get_sb,
-       .kill_sb        = kill_block_super,
-       .fs_flags       = FS_REQUIRES_DEV,
- };
+ #if !defined(CONFIG_EXT3_FS) && !defined(CONFIG_EXT3_FS_MODULE) && defined(CONFIG_EXT4_USE_FOR_EXT23)
  static inline void register_as_ext3(void)
  {
        int err = register_filesystem(&ext3_fs_type);