summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2014-07-20 23:59:16 -0700
committerBrian Norris <computersforpeace@gmail.com>2014-07-21 00:01:16 -0700
commitd0d5864676dbccfb1337864a0ae6ce97e6342678 (patch)
tree7caa674ec05a1797054cd4304f0a047b6dacddd6 /fs/btrfs/transaction.c
parent6534e6809e6c9d48114b537afe03bee3fd33bf01 (diff)
parent9a3c4145af32125c5ee39c0272662b47307a8323 (diff)
downloadop-kernel-dev-d0d5864676dbccfb1337864a0ae6ce97e6342678.zip
op-kernel-dev-d0d5864676dbccfb1337864a0ae6ce97e6342678.tar.gz
Merge tag 'v3.16-rc6' into MTD development branch
Linux 3.16-rc6
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r--fs/btrfs/transaction.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 511839c..5f379af 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -386,11 +386,13 @@ start_transaction(struct btrfs_root *root, u64 num_items, unsigned int type,
bool reloc_reserved = false;
int ret;
+ /* Send isn't supposed to start transactions. */
+ ASSERT(current->journal_info != (void *)BTRFS_SEND_TRANS_STUB);
+
if (test_bit(BTRFS_FS_STATE_ERROR, &root->fs_info->fs_state))
return ERR_PTR(-EROFS);
- if (current->journal_info &&
- current->journal_info != (void *)BTRFS_SEND_TRANS_STUB) {
+ if (current->journal_info) {
WARN_ON(type & TRANS_EXTWRITERS);
h = current->journal_info;
h->use_count++;
@@ -491,6 +493,7 @@ again:
smp_mb();
if (cur_trans->state >= TRANS_STATE_BLOCKED &&
may_wait_transaction(root, type)) {
+ current->journal_info = h;
btrfs_commit_transaction(h, root);
goto again;
}
@@ -1615,11 +1618,6 @@ static int btrfs_flush_all_pending_stuffs(struct btrfs_trans_handle *trans,
int ret;
ret = btrfs_run_delayed_items(trans, root);
- /*
- * running the delayed items may have added new refs. account
- * them now so that they hinder processing of more delayed refs
- * as little as possible.
- */
if (ret)
return ret;
OpenPOWER on IntegriCloud