From a43f7f82064220082eba7075c5a844d773fdef1b Mon Sep 17 00:00:00 2001 From: Liu Bo Date: Tue, 13 Sep 2016 19:15:48 -0700 Subject: 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 Reviewed-by: Josef Bacik Signed-off-by: David Sterba --- fs/btrfs/transaction.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index b53104042e95..2ce9115a55fd 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -549,11 +549,8 @@ again: } } while (ret == -EBUSY); - if (ret < 0) { - /* We must get the transaction if we are JOIN_NOLOCK. */ - BUG_ON(type == TRANS_JOIN_NOLOCK); + if (ret < 0) goto join_fail; - } cur_trans = root->fs_info->running_transaction; -- cgit v1.2.3-55-g7522