diff options
author | Josef Bacik <josef@toxicpanda.com> | 2024-01-02 15:18:07 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-03-04 16:24:45 +0100 |
commit | 8fd2b12e6a414b383692c7f5ca05ab75204bdece (patch) | |
tree | 82396854d1f8c633cf43fc80c5dea18ff1656e31 /fs/btrfs/extent_io.c | |
parent | 592a0ce9e2d928f6cba285e1d59ca89ce7f7c88e (diff) | |
download | linux-stable-8fd2b12e6a414b383692c7f5ca05ab75204bdece.tar.gz linux-stable-8fd2b12e6a414b383692c7f5ca05ab75204bdece.tar.bz2 linux-stable-8fd2b12e6a414b383692c7f5ca05ab75204bdece.zip |
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>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index a8c8b9d8c400..b542bd1816df 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -82,6 +82,7 @@ void btrfs_extent_buffer_leak_debug_check(struct btrfs_fs_info *fs_info) eb->start, eb->len, atomic_read(&eb->refs), eb->bflags, btrfs_header_owner(eb)); list_del(&eb->leak_list); + WARN_ON_ONCE(1); kmem_cache_free(extent_buffer_cache, eb); } spin_unlock_irqrestore(&fs_info->eb_leak_lock, flags); |