btrfs: WARN_ON_ONCE() in our leak detection code
authorJosef Bacik <josef@toxicpanda.com>
Tue, 2 Jan 2024 20:18:07 +0000 (15:18 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 4 Mar 2024 15:24:45 +0000 (16:24 +0100)
commit8fd2b12e6a414b383692c7f5ca05ab75204bdece
tree82396854d1f8c633cf43fc80c5dea18ff1656e31
parent592a0ce9e2d928f6cba285e1d59ca89ce7f7c88e
btrfs: WARN_ON_ONCE() in our leak detection code

fstests looks for WARN_ON's in dmesg.  Add WARN_ON_ONCE() to our leak
detection code (enabled only in debug builds) so that fstests will fail
if these things trip at all.  This will allow us to easily catch
problems with our reference counting that may otherwise go unnoticed.

Reviewed-by: Neal Gompa <neal@gompa.dev>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c
fs/btrfs/extent-io-tree.c
fs/btrfs/extent_io.c