Btrfs: remove BUG_ON in start_transaction

Since we could get errors from the concurrent aborted transaction,
the check of this BUG_ON in start_transaction is not true any more.

Say, while flushing free space cache inode's dirty pages,
btrfs_finish_ordered_io
 -> btrfs_join_transaction_nolock
      (the transaction has been aborted.)
      -> BUG_ON(type == TRANS_JOIN_NOLOCK);

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Liu Bo 2016-09-13 19:15:48 -07:00 committed by David Sterba
parent 3eb548ee3a
commit a43f7f8206

View file

@ -549,11 +549,8 @@ start_transaction(struct btrfs_root *root, unsigned int num_items,
} }
} while (ret == -EBUSY); } while (ret == -EBUSY);
if (ret < 0) { if (ret < 0)
/* We must get the transaction if we are JOIN_NOLOCK. */
BUG_ON(type == TRANS_JOIN_NOLOCK);
goto join_fail; goto join_fail;
}
cur_trans = root->fs_info->running_transaction; cur_trans = root->fs_info->running_transaction;