]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
BUG_ON conversion for fs/xfs/
authorEric Sesterhenn <snakebyte@gmx.de>
Tue, 3 Oct 2006 21:37:55 +0000 (23:37 +0200)
committerAdrian Bunk <bunk@stusta.de>
Tue, 3 Oct 2006 21:37:55 +0000 (23:37 +0200)
This patch converts two if () BUG(); construct to BUG_ON();
which occupies less space, uses unlikely and is safer when
BUG() is disabled.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
fs/xfs/support/debug.c

index 36fbeccdc722c27a5492076fad587b13f98d5e8c..c75f68361e33dda4276b29583b5d45d8f33afd15 100644 (file)
@@ -53,8 +53,7 @@ cmn_err(register int level, char *fmt, ...)
        va_end(ap);
        spin_unlock_irqrestore(&xfs_err_lock,flags);
 
-       if (level == CE_PANIC)
-               BUG();
+       BUG_ON(level == CE_PANIC);
 }
 
 void
@@ -72,8 +71,7 @@ icmn_err(register int level, char *fmt, va_list ap)
                strcat(message, "\n");
        spin_unlock_irqrestore(&xfs_err_lock,flags);
        printk("%s%s", err_level[level], message);
-       if (level == CE_PANIC)
-               BUG();
+       BUG_ON(level == CE_PANIC);
 }
 
 void