* some fairly slow code that needs optimization. This walks the list
  * of all the inodes with pending delalloc and forces them to disk.
  */
-static int __start_delalloc_inodes(struct btrfs_root *root, int delay_iput,
-                                  int nr)
+static int start_delalloc_inodes(struct btrfs_root *root, int nr)
 {
        struct btrfs_inode *binode;
        struct inode *inode;
                }
                spin_unlock(&root->delalloc_lock);
 
-               work = btrfs_alloc_delalloc_work(inode, delay_iput);
+               work = btrfs_alloc_delalloc_work(inode, 0);
                if (!work) {
-                       if (delay_iput)
-                               btrfs_add_delayed_iput(inode);
-                       else
-                               iput(inode);
+                       iput(inode);
                        ret = -ENOMEM;
                        goto out;
                }
        if (test_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state))
                return -EROFS;
 
-       ret = __start_delalloc_inodes(root, 0, -1);
+       ret = start_delalloc_inodes(root, -1);
        if (ret > 0)
                ret = 0;
        return ret;
                               &fs_info->delalloc_roots);
                spin_unlock(&fs_info->delalloc_root_lock);
 
-               ret = __start_delalloc_inodes(root, 0, nr);
+               ret = start_delalloc_inodes(root, nr);
                btrfs_put_fs_root(root);
                if (ret < 0)
                        goto out;