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

Commit c293498b authored by Stoyan Gaydarov's avatar Stoyan Gaydarov Committed by Chris Mason
Browse files

Btrfs: BUG to BUG_ON changes

parent 3e7ad38d
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -2157,8 +2157,7 @@ static int insert_ptr(struct btrfs_trans_handle *trans, struct btrfs_root
	BUG_ON(!path->nodes[level]);
	BUG_ON(!path->nodes[level]);
	lower = path->nodes[level];
	lower = path->nodes[level];
	nritems = btrfs_header_nritems(lower);
	nritems = btrfs_header_nritems(lower);
	if (slot > nritems)
	BUG_ON(slot > nritems);
		BUG();
	if (nritems == BTRFS_NODEPTRS_PER_BLOCK(root))
	if (nritems == BTRFS_NODEPTRS_PER_BLOCK(root))
		BUG();
		BUG();
	if (slot != nritems) {
	if (slot != nritems) {
+1 −2
Original line number Original line Diff line number Diff line
@@ -253,8 +253,7 @@ int btrfs_add_free_space(struct btrfs_block_group_cache *block_group,


	if (ret) {
	if (ret) {
		printk(KERN_ERR "btrfs: unable to add free space :%d\n", ret);
		printk(KERN_ERR "btrfs: unable to add free space :%d\n", ret);
		if (ret == -EEXIST)
		BUG_ON(ret == -EEXIST);
			BUG();
	}
	}


	return ret;
	return ret;
+1 −2
Original line number Original line Diff line number Diff line
@@ -1222,8 +1222,7 @@ insert:
	ret = insert_one_name(trans, root, path, key->objectid, key->offset,
	ret = insert_one_name(trans, root, path, key->objectid, key->offset,
			      name, name_len, log_type, &log_key);
			      name, name_len, log_type, &log_key);


	if (ret && ret != -ENOENT)
	BUG_ON(ret && ret != -ENOENT);
		BUG();
	goto out;
	goto out;
}
}