Skip to content

Commit 4470575

Browse files
rddunlaptytso
authored andcommitted
jbd2: fix build when CONFIG_BUG is not enabled
Fix build error when CONFIG_BUG is not enabled: fs/jbd2/transaction.c:1175:3: error: implicit declaration of function '__WARN' by changing __WARN() to WARN_ON(), as suggested by Arnaud Lacombe <lacombar@gmail.com>. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Arnaud Lacombe <lacombar@gmail.com>
1 parent b3ff056 commit 4470575

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎fs/jbd2/transaction.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <linux/highmem.h>
2828
#include <linux/hrtimer.h>
2929
#include <linux/backing-dev.h>
30+
#include <linux/bug.h>
3031
#include <linux/module.h>
3132

3233
static void __jbd2_journal_temp_unlink_buffer(struct journal_head *jh);
@@ -1171,8 +1172,7 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh)
11711172
jbd_unlock_bh_state(bh);
11721173
out:
11731174
JBUFFER_TRACE(jh, "exit");
1174-
if (ret)
1175-
__WARN(); /* All errors are bugs, so dump the stack */
1175+
WARN_ON(ret); /* All errors are bugs, so dump the stack */
11761176
return ret;
11771177
}
11781178

0 commit comments

Comments
 (0)