diff options
author | Chris Mason <chris.mason@oracle.com> | 2012-01-16 21:26:31 +0100 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2012-01-16 21:26:31 +0100 |
commit | 9785dbdf265ddc47d5c88267d89a97648c0dc14b (patch) | |
tree | 3a97a48d6f282f9e06c5446beeb886fcd86c4798 /fs/btrfs/transaction.c | |
parent | Merge branch 'for-chris' of git://repo.or.cz/linux-btrfs-devel into integration (diff) | |
parent | Btrfs: make sure we're not using obsolete code in btrfs_get_extent (diff) | |
download | linux-9785dbdf265ddc47d5c88267d89a97648c0dc14b.tar.xz linux-9785dbdf265ddc47d5c88267d89a97648c0dc14b.zip |
Merge branch 'for-chris' of git://git.jan-o-sch.net/btrfs-unstable into integration
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r-- | fs/btrfs/transaction.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 360c2dfd1ee6..d5f987b49d70 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -36,6 +36,8 @@ static noinline void put_transaction(struct btrfs_transaction *transaction) WARN_ON(atomic_read(&transaction->use_count) == 0); if (atomic_dec_and_test(&transaction->use_count)) { BUG_ON(!list_empty(&transaction->list)); + WARN_ON(transaction->delayed_refs.root.rb_node); + WARN_ON(!list_empty(&transaction->delayed_refs.seq_head)); memset(transaction, 0, sizeof(*transaction)); kmem_cache_free(btrfs_transaction_cachep, transaction); } @@ -108,8 +110,11 @@ loop: cur_trans->delayed_refs.num_heads = 0; cur_trans->delayed_refs.flushing = 0; cur_trans->delayed_refs.run_delayed_start = 0; + cur_trans->delayed_refs.seq = 1; + init_waitqueue_head(&cur_trans->delayed_refs.seq_wait); spin_lock_init(&cur_trans->commit_lock); spin_lock_init(&cur_trans->delayed_refs.lock); + INIT_LIST_HEAD(&cur_trans->delayed_refs.seq_head); INIT_LIST_HEAD(&cur_trans->pending_snapshots); list_add_tail(&cur_trans->list, &root->fs_info->trans_list); @@ -1386,9 +1391,9 @@ int btrfs_clean_old_snapshots(struct btrfs_root *root) if (btrfs_header_backref_rev(root->node) < BTRFS_MIXED_BACKREF_REV) - btrfs_drop_snapshot(root, NULL, 0); + btrfs_drop_snapshot(root, NULL, 0, 0); else - btrfs_drop_snapshot(root, NULL, 1); + btrfs_drop_snapshot(root, NULL, 1, 0); } return 0; } |