From: Alexey Dobriyan Date: Wed, 27 Sep 2006 08:49:28 +0000 (-0700) Subject: [PATCH] jbd: use BUILD_BUG_ON in journal init X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=2aed3484695ecb03f1395bb62f1099e8b0826124;p=openwrt%2Fstaging%2Fblogic.git [PATCH] jbd: use BUILD_BUG_ON in journal init Signed-off-by: Alexey Dobriyan Acked-by: Stephen Tweedie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c index 87c5a6d00805..2613fca92740 100644 --- a/fs/jbd/journal.c +++ b/fs/jbd/journal.c @@ -2047,13 +2047,7 @@ static int __init journal_init(void) { int ret; -/* Static check for data structure consistency. There's no code - * invoked --- we'll just get a linker failure if things aren't right. - */ - extern void journal_bad_superblock_size(void); - if (sizeof(struct journal_superblock_s) != 1024) - journal_bad_superblock_size(); - + BUILD_BUG_ON(sizeof(struct journal_superblock_s) != 1024); ret = journal_init_caches(); if (ret != 0)