aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-06-08 15:33:54 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-06-08 15:33:54 -0400
commit08607c1b182b3b8b54d7141a0c012cda17d201e6 (patch)
treed0cf03f3c03ca513377f85cf58ee0fbafcfd3f00 /fs/btrfs/disk-io.c
parentfabb568183de7996257080260d3537fa75b3667e (diff)
Btrfs: add compat ioctl
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 3da057f78bc8..048282f06afb 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -577,6 +577,7 @@ struct btrfs_root *open_ctree(struct super_block *sb)
577 fs_info->do_barriers = 1; 577 fs_info->do_barriers = 1;
578 fs_info->extent_tree_insert_nr = 0; 578 fs_info->extent_tree_insert_nr = 0;
579 fs_info->extent_tree_prealloc_nr = 0; 579 fs_info->extent_tree_prealloc_nr = 0;
580 INIT_DELAYED_WORK(&fs_info->trans_work, btrfs_transaction_cleaner);
580 BTRFS_I(fs_info->btree_inode)->root = tree_root; 581 BTRFS_I(fs_info->btree_inode)->root = tree_root;
581 memset(&BTRFS_I(fs_info->btree_inode)->location, 0, 582 memset(&BTRFS_I(fs_info->btree_inode)->location, 0,
582 sizeof(struct btrfs_key)); 583 sizeof(struct btrfs_key));
@@ -648,7 +649,6 @@ struct btrfs_root *open_ctree(struct super_block *sb)
648 btrfs_read_block_groups(extent_root); 649 btrfs_read_block_groups(extent_root);
649 650
650 fs_info->generation = btrfs_super_generation(disk_super) + 1; 651 fs_info->generation = btrfs_super_generation(disk_super) + 1;
651 memset(&fs_info->kobj, 0, sizeof(fs_info->kobj));
652 mutex_unlock(&fs_info->fs_mutex); 652 mutex_unlock(&fs_info->fs_mutex);
653 return tree_root; 653 return tree_root;
654} 654}
@@ -746,6 +746,7 @@ int close_ctree(struct btrfs_root *root)
746 struct btrfs_trans_handle *trans; 746 struct btrfs_trans_handle *trans;
747 struct btrfs_fs_info *fs_info = root->fs_info; 747 struct btrfs_fs_info *fs_info = root->fs_info;
748 748
749 btrfs_transaction_flush_work(root);
749 mutex_lock(&fs_info->fs_mutex); 750 mutex_lock(&fs_info->fs_mutex);
750 trans = btrfs_start_transaction(root, 1); 751 trans = btrfs_start_transaction(root, 1);
751 btrfs_commit_transaction(trans, root); 752 btrfs_commit_transaction(trans, root);
@@ -776,7 +777,6 @@ int close_ctree(struct btrfs_root *root)
776 del_fs_roots(fs_info); 777 del_fs_roots(fs_info);
777 kfree(fs_info->extent_root); 778 kfree(fs_info->extent_root);
778 kfree(fs_info->tree_root); 779 kfree(fs_info->tree_root);
779 kobject_unregister(&fs_info->kobj);
780 return 0; 780 return 0;
781} 781}
782 782