- tmp_inode = ext4_new_inode(handle,
- inode->i_sb->s_root->d_inode,
-- S_IFREG);
-+ S_IFREG, 0);
- if (IS_ERR(tmp_inode)) {
- retval = -ENOMEM;
- ext4_journal_stop(handle);
+
+@@ -2274,6 +2275,11 @@ static int ext4_fill_super(struct super_
+ p->proc_fops = &ext4_ui_proc_fops;
+ p->data = &sbi->s_inode_readahead_blks;
+ }
++ p = create_proc_entry("inode_goal", 0644, sbi->s_proc);
++ if (p) {
++ p->proc_fops = &ext4_ui_proc_fops,
++ p->data = &sbi->s_inode_goal;
++ }
+ }
+ #endif
+
+@@ -2553,6 +2558,7 @@ failed_mount2:
+ failed_mount:
+ if (sbi->s_proc) {
+ remove_proc_entry("inode_readahead_blks", sbi->s_proc);
++ remove_proc_entry("inode_goal", sbi->s_proc);
+ remove_proc_entry(sb->s_id, ext4_proc_root);
+ }
+ #ifdef CONFIG_QUOTA
+Index: linux-stage/fs/ext4/ext4_sb.h
+===================================================================
+--- linux-stage.orig/fs/ext4/ext4_sb.h
++++ linux-stage/fs/ext4/ext4_sb.h
+@@ -53,6 +53,7 @@ struct ext4_sb_info {
+ int s_inode_size;
+ int s_first_ino;
+ unsigned int s_inode_readahead_blks;
++ unsigned int s_inode_goal;
+ spinlock_t s_next_gen_lock;
+ u32 s_next_generation;
+ u32 s_hash_seed[4];
+