From: Simon Wilkinson Date: Sun, 12 Sep 2010 11:07:59 +0000 (+0100) Subject: Linux: print after BUG() is pretty useless X-Git-Tag: openafs-devel-1_5_78~140 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=ade14eedf35ac8912dee130c5d6c706cf5efe7f8;p=packages%2Fo%2Fopenafs.git Linux: print after BUG() is pretty useless Calling BUG() panics the machine, so having a print statement with further debugging information after it doesn't help much. Swap the ordering, so we at least see the message. Change-Id: I3aa3b8ba5faaa40cef7bb046093b322212eea2b8 Reviewed-on: http://gerrit.openafs.org/2754 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ff100901e0da8d236c7ae8b4d478600146d8f182) Reviewed-on: http://gerrit.openafs.org/2802 --- diff --git a/src/afs/LINUX/osi_alloc.c b/src/afs/LINUX/osi_alloc.c index b586d7b7d..b10bbabf5 100644 --- a/src/afs/LINUX/osi_alloc.c +++ b/src/afs/LINUX/osi_alloc.c @@ -347,8 +347,8 @@ osi_linux_free(void *addr) afs_atomlist_put(al_mem_pool, lmp); /* return osi_linux_mem struct to pool */ afs_linux_cur_allocs--; } else { - BUG(); printf("osi_linux_free: failed to remove chunk from hashtable\n"); + BUG(); } up(&afs_linux_alloc_sem); diff --git a/src/afs/LINUX24/osi_alloc.c b/src/afs/LINUX24/osi_alloc.c index 30a69a501..d4f91cba3 100644 --- a/src/afs/LINUX24/osi_alloc.c +++ b/src/afs/LINUX24/osi_alloc.c @@ -364,8 +364,8 @@ osi_linux_free(void *addr) afs_atomlist_put(al_mem_pool, lmp); /* return osi_linux_mem struct to pool */ afs_linux_cur_allocs--; } else { - BUG(); printf("osi_linux_free: failed to remove chunk from hashtable\n"); + BUG(); } up(&afs_linux_alloc_sem);