aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2016-07-11 21:52:57 -0400
committerDavid Sterba <dsterba@suse.com>2016-07-26 07:52:25 -0400
commitf49070957ffed84feb7944550f7edd53672b5201 (patch)
tree3940871f4eec0f48ac52a78e4d12aac15742c2cc
parent39581a3a1af7e03af41dde62a6485a934deb109b (diff)
Btrfs: change BUG_ON()'s to ASSERT()'s in backref_cache_cleanup()
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>
-rw-r--r--fs/btrfs/relocation.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index fc067b07e31f..13c9a48c83b0 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -235,12 +235,12 @@ static void backref_cache_cleanup(struct backref_cache *cache)
235 cache->last_trans = 0; 235 cache->last_trans = 0;
236 236
237 for (i = 0; i < BTRFS_MAX_LEVEL; i++) 237 for (i = 0; i < BTRFS_MAX_LEVEL; i++)
238 BUG_ON(!list_empty(&cache->pending[i])); 238 ASSERT(list_empty(&cache->pending[i]));
239 BUG_ON(!list_empty(&cache->changed)); 239 ASSERT(list_empty(&cache->changed));
240 BUG_ON(!list_empty(&cache->detached)); 240 ASSERT(list_empty(&cache->detached));
241 BUG_ON(!RB_EMPTY_ROOT(&cache->rb_root)); 241 ASSERT(RB_EMPTY_ROOT(&cache->rb_root));
242 BUG_ON(cache->nr_nodes); 242 ASSERT(!cache->nr_nodes);
243 BUG_ON(cache->nr_edges); 243 ASSERT(!cache->nr_edges);
244} 244}
245 245
246static struct backref_node *alloc_backref_node(struct backref_cache *cache) 246static struct backref_node *alloc_backref_node(struct backref_cache *cache)