diff mbox

[-next] jbd2: fix build when CONFIG_BUG is not enabled

Message ID 4E9495C8.1030200@xenotime.net
State Accepted, archived
Headers show

Commit Message

Randy.Dunlap Oct. 11, 2011, 7:15 p.m. UTC
From: Randy Dunlap <rdunlap@xenotime.net>

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>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Arnaud Lacombe <lacombar@gmail.com>
---

Same build error as reported on 31-AUG-2011 for
linux-next 20110830.

 fs/jbd2/transaction.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Theodore Ts'o Oct. 27, 2011, 8:06 a.m. UTC | #1
On Tue, Oct 11, 2011 at 12:15:20PM -0700, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@xenotime.net>
> 
> 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>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Arnaud Lacombe <lacombar@gmail.com>

Thanks, applied.

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- next-2011-1011.orig/fs/jbd2/transaction.c
+++ next-2011-1011/fs/jbd2/transaction.c
@@ -27,6 +27,7 @@ 
 #include <linux/highmem.h>
 #include <linux/hrtimer.h>
 #include <linux/backing-dev.h>
+#include <linux/bug.h>
 #include <linux/module.h>
 
 static void __jbd2_journal_temp_unlink_buffer(struct journal_head *jh);
@@ -1171,8 +1172,7 @@  out_unlock_bh:
 	jbd_unlock_bh_state(bh);
 out:
 	JBUFFER_TRACE(jh, "exit");
-	if (ret)
-		__WARN();	/* All errors are bugs, so dump the stack */
+	WARN_ON(ret);	/* All errors are bugs, so dump the stack */
 	return ret;
 }