diff options
author | Josef Bacik <josef@toxicpanda.com> | 2022-09-10 00:53:22 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-09-26 13:28:03 +0300 |
commit | ad795329574c874d05084c11db01a71a5a824d47 (patch) | |
tree | 6303e9ba2d71c3ffe697fca891a933340afaede7 | |
parent | 83cf709a89fb97e78e60f310ea5f2b283e0f581c (diff) | |
download | linux-ad795329574c874d05084c11db01a71a5a824d47.tar.xz |
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: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/extent_io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index a6d7d5c1f108..c600428edcc6 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -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); |