diff options
author | Justus Winter <justus@gnupg.org> | 2017-06-19 21:20:57 +0200 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2017-08-05 18:42:22 +0200 |
commit | 835b293d35a209d38047126443d41fa7090daa4c (patch) | |
tree | 5bf956895e6030f91cd618fb191b2151f6d25423 /ext2fs/balloc.c | |
parent | dc0b5a43224999223a246870912b0f292b1980e9 (diff) | |
download | hurd-835b293d35a209d38047126443d41fa7090daa4c.tar.gz hurd-835b293d35a209d38047126443d41fa7090daa4c.tar.bz2 hurd-835b293d35a209d38047126443d41fa7090daa4c.zip |
Use our own variant of 'assert' and 'assert_perror'.
Our variants print stack traces on failures. This will make locating
errors much easier.
Diffstat (limited to 'ext2fs/balloc.c')
-rw-r--r-- | ext2fs/balloc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext2fs/balloc.c b/ext2fs/balloc.c index 0b9e5a52..8ebd11cd 100644 --- a/ext2fs/balloc.c +++ b/ext2fs/balloc.c @@ -166,7 +166,7 @@ ext2_new_block (block_t goal, ext2_debug ("goal=%u", goal); repeat: - assert (bh == NULL); + assert_backtrace (bh == NULL); /* * First, test whether the goal block is free. */ @@ -272,7 +272,7 @@ repeat: pthread_spin_unlock (&global_lock); return 0; } - assert (bh == NULL); + assert_backtrace (bh == NULL); bh = disk_cache_block_ref (gdp->bg_block_bitmap); r = memscan (bh, 0, sblock->s_blocks_per_group >> 3); j = (r - bh) << 3; @@ -291,7 +291,7 @@ repeat: } search_back: - assert (bh != NULL); + assert_backtrace (bh != NULL); /* * We have succeeded in finding a free byte in the block * bitmap. Now search backwards up to 7 bits to find the @@ -300,7 +300,7 @@ search_back: for (k = 0; k < 7 && j > 0 && !test_bit (j - 1, bh); k++, j--); got_block: - assert (bh != NULL); + assert_backtrace (bh != NULL); ext2_debug ("using block group %d (%d)", i, gdp->bg_free_blocks_count); @@ -383,7 +383,7 @@ got_block: sblock_dirty = 1; sync_out: - assert (bh == NULL); + assert_backtrace (bh == NULL); pthread_spin_unlock (&global_lock); alloc_sync (0); |