Skip to content

Commit

Permalink
xfs: Do not name variables "panic"
Browse files Browse the repository at this point in the history
On platforms that call panic() inside their BUG() macro (m68k/sun3, and
all platforms that don't set HAVE_ARCH_BUG), compilation fails with:

| fs/xfs/support/debug.c: In function ‘xfs_cmn_err’:
| fs/xfs/support/debug.c:92: error: called object ‘panic’ is not a function

as the local variable "panic" conflicts with the "panic()" function.
Rename the local variable to resolve this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
geertu authored and torvalds committed Jan 17, 2011
1 parent 8c34482 commit cf78859
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/xfs/support/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ xfs_cmn_err(
{
struct va_format vaf;
va_list args;
int panic = 0;
int do_panic = 0;

if (xfs_panic_mask && (xfs_panic_mask & panic_tag)) {
printk(KERN_ALERT "XFS: Transforming an alert into a BUG.");
panic = 1;
do_panic = 1;
}

va_start(args, fmt);
Expand All @@ -89,7 +89,7 @@ xfs_cmn_err(
printk(KERN_ALERT "Filesystem %s: %pV", mp->m_fsname, &vaf);
va_end(args);

BUG_ON(panic);
BUG_ON(do_panic);
}

void
Expand Down

0 comments on commit cf78859

Please sign in to comment.