btrfs-progs: switch BUG_ON to ASSERT in reserve_free_space
authorDavid Sterba <dsterba@suse.com>
Wed, 31 Aug 2016 17:31:57 +0000 (19:31 +0200)
committerDavid Sterba <dsterba@suse.com>
Wed, 21 Sep 2016 12:12:38 +0000 (14:12 +0200)
That's not a real error condition, catch bad function usge.

Signed-off-by: David Sterba <dsterba@suse.com>
utils.c

diff --git a/utils.c b/utils.c
index 45fde2e..79ca6ac 100644 (file)
--- 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) {