Re: [PATCH 09/31] btrfs: convert BUG_ON(EXTENT_BIT_LOCKED) checks to ASSERT's

David Sterba
2022-09-07T19:03:15Z

On Fri, Sep 02, 2022 at 04:16:14PM -0400, Josef Bacik wrote:
> These should be ASSERT()'s, not BUG_ON()'s.

This could explain why, the BUG_ON is a runtime check though not the
best one, while ASSERT is good to make sure that the API is used
correctly. It's from an old commit, I'm not sure if we have started
using asserts back then.