]> git.hungrycats.org Git - linux/commitdiff
Btrfs: change BUG_ON()'s to ASSERT()'s in backref_cache_cleanup()
authorLiu Bo <bo.li.liu@oracle.com>
Tue, 12 Jul 2016 01:52:57 +0000 (18:52 -0700)
committerZygo Blaxell <zblaxell@thirteen.furryterror.org>
Thu, 28 Jul 2016 02:20:25 +0000 (22:20 -0400)
Since it is just an in-memory building of the backrefs of several
btree blocks, nothing is fatal other than memory leaks, so this
changes BUG_ON()'s to ASSERT()'s.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
(cherry picked from commit f49070957ffed84feb7944550f7edd53672b5201)

fs/btrfs/relocation.c

index 5c806f0d443ddf59bb3829a3c79aab267526a0a1..32588372b2b1b2c4cc18d17cc8a69d49bd42ca54 100644 (file)
@@ -235,12 +235,12 @@ static void backref_cache_cleanup(struct backref_cache *cache)
        cache->last_trans = 0;
 
        for (i = 0; i < BTRFS_MAX_LEVEL; i++)
-               BUG_ON(!list_empty(&cache->pending[i]));
-       BUG_ON(!list_empty(&cache->changed));
-       BUG_ON(!list_empty(&cache->detached));
-       BUG_ON(!RB_EMPTY_ROOT(&cache->rb_root));
-       BUG_ON(cache->nr_nodes);
-       BUG_ON(cache->nr_edges);
+               ASSERT(list_empty(&cache->pending[i]));
+       ASSERT(list_empty(&cache->changed));
+       ASSERT(list_empty(&cache->detached));
+       ASSERT(RB_EMPTY_ROOT(&cache->rb_root));
+       ASSERT(!cache->nr_nodes);
+       ASSERT(!cache->nr_edges);
 }
 
 static struct backref_node *alloc_backref_node(struct backref_cache *cache)