diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-10-03 17:37:55 -0400 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2006-10-03 17:37:55 -0400 |
commit | 9ab5aa911a5b5d7c721436bce8709202b707a361 (patch) | |
tree | e24fdd1d911415bf5d15c1bf2950766c8c04543e | |
parent | 73dff8be9ea89df26bfb6a0443ad912de6e7bd00 (diff) |
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>
-rw-r--r-- | fs/xfs/support/debug.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/xfs/support/debug.c b/fs/xfs/support/debug.c index 36fbeccdc722..c75f68361e33 100644 --- a/fs/xfs/support/debug.c +++ b/fs/xfs/support/debug.c | |||
@@ -53,8 +53,7 @@ cmn_err(register int level, char *fmt, ...) | |||
53 | va_end(ap); | 53 | va_end(ap); |
54 | spin_unlock_irqrestore(&xfs_err_lock,flags); | 54 | spin_unlock_irqrestore(&xfs_err_lock,flags); |
55 | 55 | ||
56 | if (level == CE_PANIC) | 56 | BUG_ON(level == CE_PANIC); |
57 | BUG(); | ||
58 | } | 57 | } |
59 | 58 | ||
60 | void | 59 | void |
@@ -72,8 +71,7 @@ icmn_err(register int level, char *fmt, va_list ap) | |||
72 | strcat(message, "\n"); | 71 | strcat(message, "\n"); |
73 | spin_unlock_irqrestore(&xfs_err_lock,flags); | 72 | spin_unlock_irqrestore(&xfs_err_lock,flags); |
74 | printk("%s%s", err_level[level], message); | 73 | printk("%s%s", err_level[level], message); |
75 | if (level == CE_PANIC) | 74 | BUG_ON(level == CE_PANIC); |
76 | BUG(); | ||
77 | } | 75 | } |
78 | 76 | ||
79 | void | 77 | void |