Message ID | 966e008cdf776b803b96a87756aa58917212a0c6.1638440535.git.fdmanana@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs: optimize btree insertions and some cleanups | expand |
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 15357274a0c4..bcf99c787d68 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -1817,7 +1817,9 @@ static int search_leaf(struct btrfs_trans_handle *trans, err = split_leaf(trans, root, key, path, ins_len, (ret == 0)); - BUG_ON(err > 0); + ASSERT(err <= 0); + if (WARN_ON(err > 0)) + err = -EUCLEAN; if (err) ret = err; }