Skip to content

Commit

Permalink
BUG_ON conversion for fs/xfs/
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
SesterhennEric authored and AdrianBunk committed Oct 3, 2006
1 parent 73dff8b commit 9ab5aa9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fs/xfs/support/debug.c
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 9ab5aa9

Please sign in to comment.