1
0
Fork 0

BUG_ON conversion for fs/xfs/

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>
hifive-unleashed-5.1
Eric Sesterhenn 2006-10-03 23:37:55 +02:00 committed by Adrian Bunk
parent 73dff8be9e
commit 9ab5aa911a
1 changed files with 2 additions and 4 deletions

View 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