From 55e8196a57cfe603ce3480a66c15dde3a13fe218 Mon Sep 17 00:00:00 2001 From: Omar Sandoval Date: Tue, 6 Jun 2017 16:45:27 -0700 Subject: [PATCH] Btrfs: make BUG_ON() in add_pinned_bytes() an ASSERT() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The value of flags is one of DATA/METADATA/SYSTEM, they must exist at when add_pinned_bytes is called. Signed-off-by: Omar Sandoval Tested-by: Holger Hoffstätte Reviewed-by: David Sterba [ added changelog ] Signed-off-by: David Sterba --- fs/btrfs/extent-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index d784ecef27c0..b344966585c8 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -783,7 +783,7 @@ static void add_pinned_bytes(struct btrfs_fs_info *fs_info, s64 num_bytes, } space_info = __find_space_info(fs_info, flags); - BUG_ON(!space_info); /* Logic bug */ + ASSERT(space_info); percpu_counter_add(&space_info->total_bytes_pinned, num_bytes); } -- 2.45.2