From 2d7c6dc931653c63b171eed483d6247eb745c20d Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 31 Aug 2016 19:31:57 +0200 Subject: [PATCH] btrfs-progs: switch BUG_ON to ASSERT in reserve_free_space That's not a real error condition, catch bad function usge. Signed-off-by: David Sterba --- utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.c b/utils.c index 45fde2e..79ca6ac 100644 --- a/utils.c +++ b/utils.c @@ -192,7 +192,7 @@ static int reserve_free_space(struct cache_tree *free_tree, u64 len, struct cache_extent *cache; int found = 0; - BUG_ON(!ret_start); + ASSERT(ret_start != NULL); cache = first_cache_extent(free_tree); while (cache) { if (cache->size > len) { -- 2.7.4