]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Linux: print after BUG() is pretty useless
authorSimon Wilkinson <sxw@your-file-system.com>
Sun, 12 Sep 2010 11:07:59 +0000 (12:07 +0100)
committerDerrick Brashear <shadow@dementia.org>
Mon, 27 Sep 2010 15:28:47 +0000 (08:28 -0700)
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 <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit ff100901e0da8d236c7ae8b4d478600146d8f182)
Reviewed-on: http://gerrit.openafs.org/2802

src/afs/LINUX/osi_alloc.c
src/afs/LINUX24/osi_alloc.c

index b586d7b7dfa4f88569a50cdf03e37eb33aa5d42b..b10bbabf506b5e0d4127c3e04fa6b97eb552ca82 100644 (file)
@@ -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);
index 30a69a501f72e773e41f35270c0fa5fe53ca78a1..d4f91cba3e7d63b8ff70ef1f21ed7a7b54ae5724 100644 (file)
@@ -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);