Btrfs: start of support for many FS volumes
Signed-off-by: Chris Mason <chris.mason@oracle.com>
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 2b0f98c..20d84bd 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -52,6 +52,8 @@
kmem_cache_alloc(btrfs_trans_handle_cachep, GFP_NOFS);
int ret;
+ /* FIXME, use the right root */
+ root = root->fs_info->fs_root;
mutex_lock(&root->fs_info->trans_mutex);
ret = join_transaction(root);
BUG_ON(ret);
@@ -69,6 +71,10 @@
struct btrfs_root *root)
{
struct btrfs_transaction *cur_trans;
+
+ /* FIXME, use the right root */
+ root = root->fs_info->fs_root;
+
WARN_ON(trans->magic != TRANS_MAGIC);
WARN_ON(trans->magic2 != TRANS_MAGIC);
mutex_lock(&root->fs_info->trans_mutex);
@@ -148,6 +154,9 @@
struct btrfs_transaction *cur_trans;
DEFINE_WAIT(wait);
+ /* FIXME, use the right root */
+ root = root->fs_info->fs_root;
+
mutex_lock(&root->fs_info->trans_mutex);
if (trans->transaction->in_commit) {
printk("already in commit!, waiting\n");