Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a43f7f82 authored by Liu Bo's avatar Liu Bo Committed by David Sterba
Browse files

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: default avatarLiu Bo <bo.li.liu@oracle.com>
Reviewed-by: default avatarJosef Bacik <jbacik@fb.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 3eb548ee
Loading
Loading
Loading
Loading
+1 −4
Original line number Original line Diff line number Diff line
@@ -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;