summaryrefslogtreecommitdiff
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-04-06 15:37:36 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-04-06 15:37:36 -0400
commitd6e4a428eb8f92bbb3537ccabadfb1195efb432b (patch)
treeca408dbd20b38728412b58db5a6ec29aebbc0fe7 /fs/btrfs/transaction.c
parent3eb0314dc1053b1ae617dcc8d6d93f776c5baa31 (diff)
downloadlwn-d6e4a428eb8f92bbb3537ccabadfb1195efb432b.tar.gz
lwn-d6e4a428eb8f92bbb3537ccabadfb1195efb432b.zip
Btrfs: start of support for many FS volumes
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r--fs/btrfs/transaction.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 2b0f98c92123..20d84bd03223 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -52,6 +52,8 @@ struct btrfs_trans_handle *btrfs_start_transaction(struct btrfs_root *root,
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 @@ int btrfs_end_transaction(struct btrfs_trans_handle *trans,
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 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
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");