Commit ad795329 authored by Josef Bacik's avatar Josef Bacik Committed by David Sterba

btrfs: convert BUG_ON(EXTENT_BIT_LOCKED) checks to ASSERT's

We only call these functions from the qgroup code which doesn't call
with EXTENT_BIT_LOCKED.  These are BUG_ON()'s that exist to keep us
developers from using these functions with EXTENT_BIT_LOCKED, so convert
them to ASSERT()'s.
Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 83cf709a
......@@ -1293,7 +1293,7 @@ int set_record_extent_bits(struct extent_io_tree *tree, u64 start, u64 end,
* either fail with -EEXIST or changeset will record the whole
* range.
*/
BUG_ON(bits & EXTENT_LOCKED);
ASSERT(!(bits & EXTENT_LOCKED));
return set_extent_bit(tree, start, end, bits, 0, NULL, NULL, GFP_NOFS,
changeset);
......@@ -1321,7 +1321,7 @@ int clear_record_extent_bits(struct extent_io_tree *tree, u64 start, u64 end,
* Don't support EXTENT_LOCKED case, same reason as
* set_record_extent_bits().
*/
BUG_ON(bits & EXTENT_LOCKED);
ASSERT(!(bits & EXTENT_LOCKED));
return __clear_extent_bit(tree, start, end, bits, 0, 0, NULL, GFP_NOFS,
changeset);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment